(Solved) : Write Program Help Travelling Sales Person Keep Daily Mileage Driven Business Main Method Q42710368 . . .

Write a program to help a travelling sales person keep up withtheir daily mileage driven for business. In your main method, theprogram should first ask the user how many days of mileage theywant to enter and then collect the user input for each day’s miles,storing the values entered in an appropriately sized array.

After collecting the user input for the miles, the main methodshould use a do…while loop to present a menu to the user as shownin the example below. The main method should take the user’s pickfrom the menu and use a switch statement to call the appropriatemethod(s) to carry out the requested task and output any returneddata to the user. The menu should keep being presented to the useruntil the Exit option is chosen by the user. If the user types in awrong menu item number, they should be told they entered an invalidchoice and then given another chance to choose an option.

User Menu Example:

  1. Find the number of days with 0 miles driven.

  2. Find the day(s) with the highest number of miles driven.

  3. Find the average miles driven.

  4. Print the miles entered by day.

  5. Exit

Choose an option from the menu:

Other Requirements:

  • All input and output for this program should be done through aScanner object and the console.

Expert Answer


Answer to Write a program to help a travelling sales person keep up with their daily mileage driven for business. In your main met…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?