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

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 Databases Questions!