Construct an application that will choose the best route to take given
both the distance and the current traffic conditions.
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.
338,976 students got unstuck by Course
Hero in the last week
Our Expert Tutors provide step by step solutions to help you excel in your courses