Question: In C + + please Main.Cpp Can not change at all main.cpp #include #include Car.h using namespace std; int main ( ) { int
In C please
Main.Cpp Can not change at all
main.cpp
#include
#include "Car.h
using namespace std;
int main
int numGallons;
int mpgCity;
int mpgHighway;
Car myCar;
cin numGallons;
cin mpgCity;
cin mpgHighway;
myCar.SetGallonsnumGallons;
myCar.SetMpgCitympgCity;
myCar.SetMpgHighwaympgHighway;
myCar.PrintInfo;
return ;
Car.cpp
#include
#include
#include "Car.h
using namespace std;
void Car::SetGallonsint gallons
fuelTankCapacity gallons;
void Car::SetMpgCityint MPGCity
mpgCity MPGCity;
void Car::SetMpgHighwayint MPGHighway
mpgHighway MPGHighway;
TODO: Implement GetGallonsint function
TODO: Implement GetMpgCityint function
TODO: Implement GetMpgHighwayint function
TODO: Implement PrintInfo function to output mpgCity, mpgHighway, and range
Car.h
#ifndef CARH
#define CARH
#include
using namespace std;
class Car
private:
int fuelTankCapacity;
TODO: Declare mphCity member int
TODO: Declare mphHighway member int
public:
void SetGallonsint gallons;
TODO: Declare SetMpgCityint function
TODO: Declare SetMpgHighwayint function
int GetGallons const;
TODO: Declare GetMpgCity function
TODO: Declare GetMpgHighway function
TODO: Declare PrintInfo method to output mpgCity, mpgHighway, and range
#endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
