make and application that will choose the best route to take given both the distance and the current traffic
Create two arrays. The first has the travel distance between two points. There can be more than one path between origination and destination. You should make a file with 3 points and 3 paths between each pair.
The second array is the current update file. It will have the route numbers and the average speed at the current time.
Source Destination route# distance
A B AB1 12.3
A B AB2 13.1
A B AB3 13.3
A C AC1 3.4
A C AC2 3.6
A C AC3 4.5
Sample update file:
Loop and ask the user for the source and destination of their trip. Use the data you stored to find the most efficient route.
Recently Asked Questions
- How can I demonstrate in java that the order of catch blocks is important. If you try to catch a superclass exception type before a subclass type, the compiler
- Could you explain what the differences of handling Socket and ServerSocket are with couple of expample
- please help! i want to know how to do it without using try-catch loop