Question: Chapter 2 Vehicle Routing An intercampus shuttle can take one of several routes. For each run, a dispatcher checks what the current traffic conditions are
Chapter
Vehicle Routing
An intercampus shuttle can take one of several routes. For each run, a dispatcher checks what the current traffic conditions are to find out the average speed on each route and determine which route the shuttle driver should take.
a Write a program that:
prompts for two inputs: distance in miles, and speed in miles per hour
calculates the time the route should take in hours and displays this result
b In addition to displaying the time in hours, enhance your program to display the result in minutes, rounding the result to one decimal.
c Assume current traffic conditions are those found in the table follows. Run your program three times using the data below to determine the fastest route.
tableRoute type,tableDistancemilestableCurrent speedmileshourlocalparkwayhighway
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
