Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DisplayAllVehicles(vector<Truck> &tr,vector<Car> &cr,vector<Motorcycle> &mr) {
- int Displaysetup = 0;
- bool DisplayEXIT = false;
- while (!DisplayEXIT) {
- cout << " What type of Vehicle would u like to Display? " << endl << endl;
- cout << " 1. Trucks" << endl;
- cout << " 2. Cars" << endl;
- cout << " 3. Motorcycles" << endl;
- cout << " 4. Exit" << endl;
- cin >> Displaysetup;
- switch (Displaysetup) {
- case(1):
- cout << " **************************** " << endl;
- cout << "================* Trucks Information: *================" << endl;
- cout << " **************************** " << endl << endl << endl;
- for (
- int i = 0;
- i < tr.size();
- i++) {
- tr[i].DisplayTruckDetails();
- }
- DisplayEXIT = true;
- break;
- case(2):
- cout << " **************************** " << endl;
- cout << "================* Cars Information: *================" << endl;
- cout << " **************************** " << endl << endl << endl;
- for (
- int i = 0;
- i < cr.size();
- i++) {
- cr[i].DisplayCarDetails();
- }
- DisplayEXIT = true;
- break;
- case(3):
- cout << " **************************** " << endl;
- cout << "================* Motorcycles Information: *================" << endl;
- cout << " **************************** " << endl << endl << endl;
- for (
- int i = 0;
- i < mr.size();
- i++) {
- mr[i].DisplayMotorcycleDetails();
- }
- DisplayEXIT = true;
- break;
- case(4):
- DisplayEXIT = true;
- break;
- default:
- cout << "Invalid Selection" << endl;
- cin.clear();
- cin.ignore();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement