subject

Write a full class definition for a class named GasTank, and containing the following members: A data member named amount of type double. A constructor that accepts no parameters. The constructor initializes the data member amount to 0. A function named addGas that accepts a parameter of type double. The value of the amount instance variable is increased by the value of the parameter. A function named useGas that accepts a parameter of type double. The value of the amount data member is decreased by the value of the parameter. A function named getGasLevel that accepts no parameters. getGasLevel returns the value of the amount data member.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Match the personality traits with their description
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
You know the right answer?
Write a full class definition for a class named GasTank, and containing the following members: A dat...
Questions
Questions on the website: 13722362