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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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