Topic: Auto mileage
Turn In: C++ Files
Auto.h, Auto.cpp and Assignment1.cpp on
Auto.cs and Assignment1.cs
Auto.java and Assignment1.java
Expected review Material:
Given general automobile specifications, this application will keep track of remaining fuel, trip miles, and total miles.
File Name: Auto.h
Use Compiler Directives to keep CAuto from possibly being defined twice.
Filename: Auto.cpp, Auto.cs, Auto.java
CAuto() – the default constructor for the CAuto class should request from the user initial values for each of the member variables. You may format this as you wish but the information must be entered in the order shown below.
void Drive(float Miles = 1) – will move the car the specified number of miles. The total miles should be updated as well as the gallons of fuel in the tank. The drive function will be called with one argument in some cases and in others with no arguments.
void AddFuel() – should completely fill the fuel tank of the automobile.
void AddFuel(float GallonsAdded) - should add the specified number of gallons to the fuel tank. If the specified number of gallons cannot fit in the fuel tank, a polite error message should be presented to the user and the tank should be filled completely.
void ResetTripMeter() – Sets the trip miles to 0.
void Show() – should display all of the information about the automobile in a simple concise manor. For example: