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

  Draw arithmetic expression tree that has four external nodes

Draw an arithmetic expression tree that has four external nodes, storing the numbers 1, 5, 6, and 7 (with each number stored in a distinct external node.

  Description of problems and business impacts

Description of problems and business impacts

  Why embedded system processor would use concurrent processes

Explain why embedded system processor would use concurrent processes to control an alarm system in a home. Door and Window switches, motion detector all controlled through a central panel.

  Build a 4-bit parallel adder

Build a 4-bit parallel adder by using four "Full Adder" devices.

  What does an explicit type conversion from a float value

What does an explicit type conversion from a float value to an integer value do with the fractional part of the float value?

  Significant investigative approachesfor cyber crime cases

Research information related to how the computer forensics investigators in today’s world of the computer forensics investigations prepare for the execution of an actual investigation.

  Perform an amortized analysis of the running time of n

Suppose that after every K operations, we automatically make a copy of the stack for back-up purposes. (Note the stack may or may not be full at this point.)

  Management utilities can be vendor-specific or

management utilities can be vendor-specific or vendor-neutral. there are many utilities that are available to provide a

  Find the express code that corresponds to the service tag

Find the express code that corresponds to the service tag: H32Y1F1. You must show how you got your answer - For each hexadecimal digit it displays a line showing how that digit was created and finally displays a line containing the final result.

  Difference between main memory and secondary memory

A microcontroller has 24 address pins. What is the maximum size of the main memory?

  Point-to-point communication links

Suppose there is the wide-area network with N nodes, where N ≥ 2. Find out the smallest number of the point-to-point communication links such that each node within the network is able to talk to one another node?

  What is the itsec

What is the meaning of CIA triad in Information Security.What is the difference between Symmetric and Asymmetric Key Cryptography

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