|
CS 223 Out-lab 7 Week of
4/3
Due: to TA by
4/24 (extension granted)
Montana Travel Planner
The object of this assignment is to design and build an application to
calculate optimal driving routes between cities and towns within Montana.
I contacted the MT Dept of Transportation and was able to get a raw
data file for the direct distances between towns around Montana.
Here is the raw file: city.txt. You will
need to do a little text processing in order to read this file. You
may make some modifications to the file if you like in order to make it
more readable.
What to Do
- Create a Java application that include a GUI that has drop down
lists for the source and destination towns.
- You should also have a input text field for two other parameters:
- vehicle range - this parameter will be used to trim long
edges in the distance graph built from the city.txt file. You
can think of this as a limitation on the max distance between towns
that you can travel.
- vehicle speed - this parameter is the user's estimate of
the average speed he or she will be able to maintain
- Have a button that says "Find Route". When the user presses
this button, you should execute Dijkstra's shortest path algorithm to
find the shortest route between the source and destination. Each
leg of the journey should be no longer than the range parameter.
Print out the route in a separate directions window or panel.
- Also calculate the total distance of the selected route. Given
the vehicle speed, indicate the estimated travel time.
What to Turn In
- a printed copy of all source code. Ensure the source code
is documented.
- a printout of several test runs (use a screen capture to show the
GUI in action)
|