Question: ISM3230 - ISM6148 Intellij java IDE Write a program that calculates the estimated hours and minutes for a trip given the number of miles traveled
ISM3230 - ISM6148 Intellij java IDE Write a program that calculates the estimated hours and minutes for a trip given the number of miles traveled and the speed in miles per hour. These five user-defined methods 1. calculating the distance 2. calculating the average speed 3. calculating time with result in hours 4. calculating time with result in minutes 5. And a method for printing the output of the result *The options menu must be printed before each selection
Formula and Units The formula to calculate average speed is speed = distance / time The user must enter distance in miles The user must enter time in hours, where 0.25 hours is equal to 15 minutes The user must enter speed in miles/hour To determine time in minutes instead of hours, multiply the result by 60
Sample; main(String[] args) { System.out.println("Thank for using the average speed program!";
Much appreciated!
IJ Eile Edit Shell Debug Options Window Help Welcome to the Trip Time Calculator Enter the miles traveled: 200 Enter the miles per hour: 65 Estimated travel time Hours: 3 Minutes: 5 > IU Eile Edit Shell Debug Qptions Window Help Welcome to the Trip Time Calculator Enter the miles traveled: 310.5 Enter the miles per hour: 80.5 Estimated travel time Hours: 3 Minutes: 51
Step by Step Solution
There are 3 Steps involved in it
To create a Java program that calculates the estimated hours and minutes for a trip well make use of userdefined methods as specified Lets break it do... View full answer
Get step-by-step solutions from verified subject matter experts
