Create a project calledMileage. In it, create a classCar with the following properties. A car has a certainfuelEfficiency (measured in miles/gallon) and a certain amount of fuel (fuelLevel) in the gas tank.
Write a constructor for the class that accepts the efficiency value, and sets the initial fuel level to 0.
Write the following methods:
Create a car object in main and test your class. Here is a sample run of the program:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here