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;
- int main()
- {
- int vOption;
- string restart;
- string vMake;
- string vModel;
- double vTopSpeed;
- double vEngineSize;
- int cNumOfDoors;
- do{
- cout << "Welcome to my Vehicles Object Orientated Program!" << endl;
- cout << endl;
- cout << "Select one of the options below to create the vehicle below: " << endl;
- cout << "[1] - Car" << endl;
- cout << "[2] - Bike" << endl;
- cout << endl;
- cout << "Choice: ";
- cin >> vOption;
- cout << endl;
- if (vOption == 1)
- {
- cout << "Vehicle Make: ";
- cin >> vMake;
- cout << " " << endl;
- cout << "Vehicle Model: ";
- cin >> vModel;
- cout << endl;
- cout << "Vehicle Top Speed: ";
- cin >> vTopSpeed;
- cout << endl;
- cout << "Vehicle Engine Size: ";
- cin >> vEngineSize;
- cout << endl;
- cout << "Vehicle Number Of Doors: ";
- cin >> cNumOfDoors;
- cout << endl;
- Car c1 = Car(vMake, vModel, vTopSpeed, vEngineSize, cNumOfDoors);
- c1.Display();
- cout << endl;
- }
- /*
- else if (vOption == 2)
- {
- Bikes b1 = Bikes(vMake, vModel, vTopSpeed, vEngineSize);
- b1.Display()
- }*/
- else
- {
- cout << "You have not entered a valid option" << endl;
- cout << endl;
- }
- cout << "Would you like to create another vehicle? (Yes or No): ";
- cin >> restart;
- } while (restart == "Yes");
- cin.ignore(2);
- return 0;
- }
Add Comment
Please, Sign In to add comment