Computers and Technology

Write the definition for a class named GasPump to be used to model a pump at an automobile service station. Before you go further with this programming exercise, write down the behavior you expect from a gas pump from the point of view of the purchaser.1. Below are listed things a gas pump might be expected to do. Implement and test the design for a gas pump class. 2. A display of the amount dispensed. A display of the amount charged for the amount dispensed. 3. A display of the cost per gallon. Before use. the gas pump must reset the amount dispensed and amount charged to zero. 4. Once started, a gas pump continues to dispense fuel, keep track of the amount dispensed, and compute the charge for the amount dispensed until stopped. 5. A stop dispensing control of some kind is needed.6. Implement the behavior of the gas pump as declarations of member functions of the gas pump class, then write implementations of these member functions. You will have to decide if there is data the gas pump has to keep track of that the user of the pump should not have access to. If so. make these private member variables.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:00, Jadaflournoy5
Check my work the microprocessor is a(n) circuit, which is designed to process data based on a set of instructions. most desktop and laptop devices contain a microprocessor based on the standard. most tablets and smartphones contain processors based on technology. a microprocessor's circuitry is designed to perform a limited number of tasks contained in its set. during processing, an instruction is loaded into the processor's unit. data is loaded into registers in the processor's where arithmetic and logic operations are performed. microprocessor performance can be measured by its speed. other factors affecting overall processing performance include word size, cache size, and instruction set complexity. most digital devices contain only one microprocessor chip, but today's multi- processors contain circuitry that supports parallel processing. computers contain various kinds of memory. random memory is a special holding area for data, program instructions, and the system. it stores data on a temporary basis until the processor makes a data request. ram is different from disk storage because it is , which means that it can hold data only when the computer power is turned on. computers also contain read- memory, which is a type of non-volatile memory that provides a set of "hard-wired" instructions, called the loader, that a computer uses to boot up.
Answers: 3
image
Computers and Technology, 23.06.2019 17:00, chrisgaz14
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, kandi2565
What is a programming method that provides for interactive modules to a website?
Answers: 1
image
Computers and Technology, 24.06.2019 09:00, king514
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
Do you know the correct answer?
Write the definition for a class named GasPump to be used to model a pump at an automobile service s...

Questions in other subjects: