Question: Chapter 1 1 Arrival Time Estimator Create a program that calculates the estimated duration of a trip in hours and minutes. This should include an

Chapter 11 Arrival Time Estimator
Create a program that calculates the estimated duration of a trip in hours and minutes. This should include an estimated date/time of departure and an estimated date/time of arrival. Display the output with the format shown below.
Console
```
Arrival Time Estimator
Enter date of departure (YYYY-MM-DD): 2020-11-23
Enter time of departure (HH:MM AM/PM): 10:30 PM
Enter miles: 480
Enter miles per hour: 75
Estimated travel time
Hours: 6
Minutes: 24
Estimated date of arrival: 2020-11-24
Estimated time of arrival: 04:54 AM
Continue? (}\textrm{y}/\textrm{n}):\textrm{y
Enter date of departure (YYYY-MM-DD): 2020-12-01
Enter time of departure (HH:MM AM/PM): 11:00 MM
Enter miles: 500
Enter miles per hour: 80
Estimated travel time
Hours: 6
Minutes: 15
Estimated date of arrival: 2020-12-01
Estimated time of arrival: 05:15 PM
Continue? (y/n): n
Bye!
```
Specifications
- For the date/time of departure and arrival, the program should use the YYYY-MM- DD format for dates and the HH:MM AM/PM format for times.
- Create a single data/time string variable based on the two input variables. Use this combined string variable to create a departure date-time object that will be used to determine the estimated arrival date and time.
- For the miles and miles per hour, the program should only accept integer entries, such as 200 for miles or 65 for mph .
- Calculate the hours travelled based on the integer division of miles divided by mph. The minutes are based on the remainder of miles divided by mph. The remainder must then be converted to minutes based on the mph . Use the hours and minutes to create a time delta object.
Chapter 1 1 Arrival Time Estimator Create a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!