Show total distance traveled and total gas consumed

Assignment Help Computer Engineering
Reference no: EM132101188

Please 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: EM132101188

Questions Cloud

Create an array that holds random integers : Create an array that holds 1000 random integers between 1-1000. Please write a short paragraph, bullet points.
Prove the logical equivalence of conditional statement : Prove the logical equivalence of conditional statement and contrapositive of two propositional variables using truth table.
Define and integer variable named employeescount : Defines a structure called Employee that contains a character member called id that can hold an id that is up to 9 characters long and a float member.
Create a class with the name student : Create a constructor that initializes all int to 0, float to 0.0, char to ' ', name = "NoName".
Show total distance traveled and total gas consumed : Allow the user to keep entering data in 5 minute increments until the user has no more data to enter. Show total distance traveled, total gas consumed.
Create a class line which consists of start -end coordinates : Create a class Line which consists of start and end coordinates, and line type.The default value for line type should be vertical.
Write a mips program that will read in a base : Write a MIPS program that will read in a base (as an integer) and a value (nonnegative integer but as an ASCII string) in that base.
Give the state of the array after it is max heapified : Give the state of the array after 3 "removes" (we are not really deleting anything) have been performed from the heap in phase 2 of heapsort.
Write a program to ask for the chord : With one cut across the middle of a pizza you can cut off half, that is, 50% of the pizza. With one cut at a different place you can cut off.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a c language program to generate a square wave on pin

Write a C language program to generate a square wave on pin 3 of PORTC with a 4 ms period using Timer3 in 16-bit mode with a prescaler value of 1:8.

  Define how does web change security for the internet

Much has been made of the new Web 2.0 phenomenon, including social networking sites and user-created mash-ups. How does Web 2.0 change security.

  What type of security and protection is required

You have recently accepted a position as a network administrator supporting the computer network at Camp David the US Presidential retreat in Thurmont.

  How are network computers different from personal computers

How are network computers different from traditional personal computers? Describe some usage scenarios in which it is advantageous to use network computers.

  Assume that queue is a queue type object

assume that queue is a queue type object and the size of the array-implementing queue is 100. Also, suppose that the value of the queueFront is 25 and the value of queueRear is 25.

  Explain the method to create a scheme for vb mail order

Explain the method to create a scheme for VB Mail Order

  Create a windows application that has the functionality

Create a windows application that has the functionality of a calculator but works with decimal values. Because division by zero is not thrown by the CLR when the operands are nonintegral.

  Analyzed and described whether the organization should

information technology evolves rapidly and businesses must stay abreast of that evolution in order to remain

  Cloud to provide crm installations

What "Cloud" can provide to the CRM installations in order to ease the adoption of such systems?

  Write a c language program to accomplish conversion

Repeat Example and write a C program using A/D converter's interrupt bit indicating completion of conversion. Use addresses, and other parameters.

  Are there any other examples of famous projects

Are LANs a stable technology or are they changing just as fastly as other forms of communication technologies?

  Discuss what hardware components should be considered

Discuss what hardware components should be considered when deciding what applications to install.

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