Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Vehicles.h"
- #include "Car.h"
- #include <iostream>
- #include <string>
- using namespace std;
- Car::Car(string _vMake, string _vModel, double _vTopSpeed, double _vEngineSize, int _cNumOfDoors)
- :Vehicles(_vMake, _vModel, _vTopSpeed, _vEngineSize)
- {
- }
- int Car::GetNumDoors()
- {
- return cNumOfDoors;
- }
- void Car::SetNumDoors(int _cNumOfDoors)
- {
- _cNumOfDoors = cNumOfDoors;
- }
- void Car::Display()
- {
- cout << "Vehicle Make: " << vMake << endl;
- cout << "Vehicle Model: " << vModel << endl;
- cout << "Vehicle Top Speed: " << vTopSpeed << " MPH" << endl;
- cout << "Vehicle Engine Size: " << vEngineSize << " litre" << endl;
- cout << "Vehicle Number Of Doors: " << cNumOfDoors << endl;
- }
Add Comment
Please, Sign In to add comment