Guest User

Untitled

a guest
Feb 2nd, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include "Vehicles.h"
  2. #include "Car.h"
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. Car::Car(string _vMake, string _vModel, double _vTopSpeed, double _vEngineSize, int _cNumOfDoors)
  9. :Vehicles(_vMake, _vModel, _vTopSpeed, _vEngineSize)
  10. {
  11.  
  12. }
  13.  
  14. int Car::GetNumDoors()
  15. {
  16. return cNumOfDoors;
  17. }
  18.  
  19. void Car::SetNumDoors(int _cNumOfDoors)
  20. {
  21. _cNumOfDoors = cNumOfDoors;
  22. }
  23.  
  24. void Car::Display()
  25. {
  26. cout << "Vehicle Make: " << vMake << endl;
  27. cout << "Vehicle Model: " << vModel << endl;
  28. cout << "Vehicle Top Speed: " << vTopSpeed << " MPH" << endl;
  29. cout << "Vehicle Engine Size: " << vEngineSize << " litre" << endl;
  30. cout << "Vehicle Number Of Doors: " << cNumOfDoors << endl;
  31.  
  32. }
Add Comment
Please, Sign In to add comment