Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

please use java for this.

write a program that does the following:

• Provide the following "menu" (choices) to the user:

o Enter trip data

o Show Eco Score

o Exit program

• Ask the user to choose from the menu

o Continue to show the menu (even with invalid choice - give error message but don't exit) until the user chooses "Exit program."

• For "Enter trip data":

o Ask the user for:

- # miles traveled in the past 5 minutes

- Ask the user for gallons of gas consumed in the past 5 minutes

o Calculate total distance traveled, total gas consumed (gallons), MPG over the past 5 minutes, and cumulative MPG

o Ask the user if the user would like to add more data in 5 minute increments

- Allow the user to keep entering data in 5 minute increments until the user has no more data to enter

o Return to the menu when the user is done entering trip data

• For "Show Eco Score"

o Show total distance traveled, total gas consumed, and cumulative MPG

o Show an appropriate message (you decide the message) for when cumulative MPG is: Over 100, between 50 and 100, between 30 and 50, between 10 and 30, and below 10.

o Return to the menu after displaying message

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93088455

Have any Question?


Related Questions in Computer Engineering

In the sans examples of policy the database access policy

In the SANS examples of policy, the database access policy states Database user names and passwords may be stored in a file separate from the executing body of the program's code. This file must not be world readable or ...

Simcon is a forensics software tool that can generate

SIMcon is a forensics software tool that can generate information for mobile device investigations. In Hands-On Project 12-1, you examined SMS messages on two phones that had been generated by SIMcon. In this project, yo ...

Subject digital securityprovide an fidm authentication

Subject : Digital Security Provide an FIdM authentication system that you have used (being subjet to). Tell the name of the organizations acted as the IdP (Identity Provider) and SP (Service Provider)?

What are the minimum and maximum values in decimal if an

What are the minimum and maximum values (in decimal) if an 8-bit binary number is given unsigned and two's complement formats?

Restaurant management database project the restaurant

Restaurant Management Database Project : The restaurant maintains the catalog for the list of food and beverage items that it provides. Apart from providing food facility at their own premises, the restaurant takes order ...

When we look at the ease to enter the different market

When we look at the ease to enter the different market structure, there is no doubt that 'monopoly' is the hardest. Why? -- There is only ONE firm that has established 'economies of scale' with the production of their go ...

A calling agency has data showing that the average response

A calling agency has data showing that the average response time is 5.6 minutes with a standard deviation of 1.8. The manager wants to know how much time is required for 75% of all calls to be handled (in other words, th ...

Systems analysis assignment can you answer the 4 questions

Systems Analysis assignment : Can you answer the 4 questions please? Continuing Case: Personal Trainer, Inc. Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done we ...

Explain that this threat represents a well-known and broad

Explain that this threat represents a well-known and broad category of electronic and human activities that breach the confidentiality of information.

Question suppose you have a ray of light that hits a flat

Question : Suppose you have a ray of light that hits a flat surface such as a mirror and is reflected. What is the direction of reflection? This is a problem that arises in areas such as optics and computer graphics. To ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As