Write the interface (.h file) of a class GasTank containing:
LANGUAGE: C++
CHALLENGE:
Write the interface (.h file) of a class GasTank containing:
A data member named amount of type double.
A data member named capacity of type double.
A constructor that accepts a parameter of type double.
A function named addGas that accepts a parameter of type double and returns no value.
A function named useGas that accepts a parameter of type double and returns no value.
A function named isEmpty that accepts no parameters and returns a boolean value.
A function named isFull that accepts no parameters and returns a boolean value.
A function named getGasLevel that accepts no parameters and returns a double.
A function named fillUp that accepts no parameters and returns a double.
SOLUTION:
The Bad News: The content you are trying to access is only available to members.
The Good News: You too can be a member, simply Click Here.
Already a member? Log In Here
Posted in C++, Learn To Code