+1(316)4441378

+44-141-628-6690

Python

Create a class called Tour.  An instance of this class is to be instantiated with two US cities, and is used to fetch information from the web.  Specifically, the class must define:

1.    __init__  The constructor takes two strings as arguments, each giving a city name and state abbreviation, indicating the origin and destination.  For example: Tour(New York, NY, Los Angeles, CA)represents a tour that starts in New York city and ends in Los Angeles.
2.    distance  This method takes a single (optional) argument indicating a mode one of the strings driving (default), biking, or walking.  It returns the total distance (in meters) covered by the tour for the indicated mode.  This method is where you will use urllib functions to get data from the web to find the distances between two locations in the tour and calculate the total distance.  If a response does not contain a distance value, the method should raise a ValueError exception.

Graphical User Interface Description:
Create a class called TourGui. An instance of this class is to be instantiated in the main. Specifically the class must define:
1.    __init__ The constructor doesnt take any arguments. The constructor creates two frames in the window, a top frame and buttom frame. The top frame contains a  label and an entry widget for the following fields: origin, destination, and mode. The bottom frame contains a label and text widget for Distance and a button widget for Get Distnace. The GUI should like the following:

2.    onClick This method is the event handler for the Get Distance Button. When the button is clicked, the origin, destination and mode fields are read, the query is made and the distance between the origin and the destination is displayed. If the user enters an invalid mode, a message box shows up indicating invalid mode was entered:

If the distance was not found between the origin and the destination, a message box shows up indicating the distance was not found:

Deliverables
Create a zipfile of the project folder and submit on Canvas. You must name your project as FirstnameLastnameFinalProject.

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]