Question
JAVA Instructions Travel Time Calculator Create an application that calculates travel time (not time travel) based on distance and speed. Console Welcome to the Travel
JAVA
Instructions
Travel Time Calculator
Create an application that calculates travel time (not time travel) based on distance and speed.
Console
Welcome to the Travel Time Calculator
Enter miles: 200
Enter miles per hour: 65
Estimated travel time
---------------------
Hours: 3
Minutes: 4
Continue? (y/n): y
Enter miles: 100
Enter miles per hour: 65
Estimated travel time
---------------------
Hours: 1
Minutes: 32
Continue? (y/n): n
Specifications
The application should accept decimal entries like 10.5 and 20.65.
The application should display the approximate travel time in hours and minutes.
Assume that the user will enter valid data.
The application should continue only if the user enters y or Y to continue.
Input
The vehicles miles per hour.
The number of miles you traveled
Processing
Use integer arithmetic and the division and modulus operators to get hours and minutes.
Output
Header
Number of hours and minutes it takes to make the trip
Offer user another chance to compute travel time or to exit
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