Question
Creat and application that will choose the best route to take given both the distance and the current traffic conditions. Creat two arrays. The first
Creat and application that will choose the best route to take given both the distance and the current traffic conditions.
Creat two arrays. The first has the travel distance between two points. There can be more than one path between origination and destination. You should create 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:
SourceDestinationroute#distance
ABAB112.3
ABAB213.1
ABAB313.3
ACAC13.4
ACAC23.6
ACAC34.5
Sample update file:
RouteSpeed
AB123.3
AB228.0
AB334.4
AC116.5
AC215.4
AC345.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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started