Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Distance, Speed, and Time You are tasked with creating a program for new students at your university. The program will assist the students with arriving
Distance, Speed, and Time You are tasked with creating a program for new students at your university. The program will assist the students with arriving on time to class. The program will calculate distance, average speed, time in hours or minutes for any trip. Requirements The program must use userdefined methods. These five methods are required, you can choose to have more Method for calculating the distance Method for calculating the average speed Method for calculating time with result in hours Method for calculating time with result in minutes Method for printing the output of the result, only one method to be used All user inputs must be done in method main You may create an additional method for printing the menu, but it is not required. The options menu must be printed before each selection This statement Thank for using the average speed program! doesnt need to be in printing method 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 hours is equal to minutes The user must enter speed in mileshour To determine time in minutes instead of hours, multiply the result by Input: Your program should prompt the user to make a selection from the options menu: o Please select an option from the menu: For Menu option the user will be prompted for these inputs o Please enter the speed used for the travel in mileshour: o Please enter the time traversed for the travel in hours: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the time traversed for the travel in hours: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the speed used for the travel in mileshour: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the speed used for the travel in mileshour: For Menu option there is no prompt Output: The options menu o : o Determine Distance in miles o Determine Average Speed in mileshour o Determine Time in hours o Determine Time in minutes o Exit Menu Menu option o The distance traveled is: valuemiles Menu option o The speed used to travel is: valuemileshour Menu option o The time traversed for the travel is: valuehours Menu option o The time traversed for the travel is: valueminutes Menu option o Thank for using the average speed program! please includ call method and variables needed
Distance, Speed, and Time You are tasked with creating a program for new students at your university. The program will assist the students with arriving on time to class. The program will calculate distance, average speed, time in hours or minutes for any trip.
Requirements The program must use userdefined methods. These five methods are required, you can choose to have more Method for calculating the distance Method for calculating the average speed Method for calculating time with result in hours Method for calculating time with result in minutes Method for printing the output of the result, only one method to be used All user inputs must be done in method main You may create an additional method for printing the menu, but it is not required. The options menu must be printed before each selection This statement Thank for using the average speed program! doesnt need to be in printing method
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 hours is equal to minutes The user must enter speed in mileshour To determine time in minutes instead of hours, multiply the result by
Input: Your program should prompt the user to make a selection from the options menu: o Please select an option from the menu: For Menu option the user will be prompted for these inputs o Please enter the speed used for the travel in mileshour: o Please enter the time traversed for the travel in hours: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the time traversed for the travel in hours: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the speed used for the travel in mileshour: For Menu option the user will be prompted for these inputs o Please enter the distance traveled in miles: o Please enter the speed used for the travel in mileshour: For Menu option there is no prompt
Output: The options menu o : o Determine Distance in miles o Determine Average Speed in mileshour o Determine Time in hours o Determine Time in minutes o Exit Menu Menu option o The distance traveled is: valuemiles Menu option o The speed used to travel is: valuemileshour Menu option o The time traversed for the travel is: valuehours Menu option o The time traversed for the travel is: valueminutes Menu option o Thank for using the average speed program!
please includ call method and variables needed
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