Calculate total distance traveled

Assignment Help Computer Engineering
Reference no: EM132100985

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

Reference no: EM132100985

Questions Cloud

How many drops of liquid spills out : A 2-liter coke bottle has a diameter of 110mm in the middle and length of 40cm. There is a half full bottle that is held vertically while the cap is tight.
Sales manager redesign the organizational structure : A new sales manager at an insurance agency is evaluating existing organizational structure. How might new sales manager redesign the organizational structure?
Revenues from franchised stores : Does 'sales' here include revenues from franchised stores (say the company being analyzed is a restaurant)?
What is the moment of inertia for rotation : What is the CD's moment of inertia for rotation about a perpendicular axis through the edge of the disk? Express your answer to two significant figures.
Calculate total distance traveled : Calculate total distance traveled, total gas consumed (gallons), MPG over the past 5 minutes, and cumulative MPG.
What is the present value of cash flows : If the interest rate is 6% per annum (interest paid annually), what is the present value of these cash flows?
How many of each kind were purchased : The price of admission to a high school play was $ 3.80 for students and $ 5.60 for non students. How many of each kind were purchased
Manufacturers employ the strategy of few suppliers : Manufacturers employ the strategy of "few suppliers" for the following reasons EXCEPT ____________.
What is the acceleration of the truck : A 1200kg car pushes a 2100kg truck that has a dead battery to the right. When the driver steps on the accelerator, the drive wheels of the car push against.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe four cons of virtualization

Many nameservers use a file backend configuration whereas some use a database backend allowing for instant DNS updates. Discuss some pros/cons to each.

  You are a private computer consultant and a new client has

you are a private computer consultant and a new client has approached you about upgrading his small business network.

  Explailning the forensic investigative approach

We require to assure this applicant know how to find the facts of incident and develop an initial forensic investigative approach.

  Computer platformscomputer systems may be classified into

computer platformscomputer systems may be classified into two categories classical and quantum. this assignment will

  During a whole class discussion describe the association

during a whole class discussion describe the association between information systems and the concept of competitive

  Show that v contains an additive identity

Show that given any two vectors in V, the sum of these vectors is also an element of y.- Show that V contains an additive identity.

  What is total capacity of a track

What is total capacity of a track

  Program program that converts eight (8) bit binary numbers

Write down a C++ program that converts eight (8) bit binary numbers to their decimal equivalents. The program should retrieve the binary numbers (one at a time) from a data file (use a long int for the variable that represents the binary number).

  Who is protected by hippa and who must comply with hippa

Who is protected by HIPPA? Who must comply with HIPPA? What is the relevance of health care plans, providers and clearinghouses?

  What is the future improvement and suggestion of cam design

Write a review paper of one mechanism we have learned this semester including its application, changes in design with time, and future direction.

  Questionspeedy computer inc sci is going to begin its first

questionspeedy computer inc. sci is going to begin its first laptop computer. though sci recognizes that it is a late

  Define mode of operation different from the one

despite of the fact that sequential files lack direct (targeted) addressing of each of the records and fields (e.g., you cannot easily read/replace the only record with the number 28 from 50 records in the file), they are the most widely used. Why..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd