Question

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.
Example:
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:
Route            Speed
AB1                    23.3
AB2                    28.0
AB3                    34.4
AC1                    16.5
AC2                    15.4
AC3                     45.6
 
Loop and ask the user for the source and destination of their trip. Use the data you stored to find the most efficient route.
 

Construct an application that will choose the best route to take given both the distance and the current traffic conditions. Create two arrays. The...
Get unstuck

338,976 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses