Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int Option;
- bool Exit = false;
- char Input[10];
- char P, p;
- char D, d;
- char Requirement[10];
- void BookingMainMenu(); //Booking Main Menu Function
- void BookingSportsCar(); //Sports Car Booking Function
- void Booking4x4(); //4x4 Booking Function
- void BookingVan(); //Van Booking Function
- void ViewingMainMenu(); //Viewing Main Menu Function
- void ViewingSportsCar(); //Viewing Sports Car Function
- void Viewing4x4(); //Viewing 4x4 Function
- void ViewingVan(); //Viewing Van Function
- class AllCars{
- public:
- int TotalMilesDriven;
- int TankFillingAccumulation;
- int NumberOfRepairs;
- int TaxRate;
- char InsuranceGroup[1];
- int TyreChangeCount;
- int DateBookedOut;
- int NumberOfDaysBooked;
- char FuelType[6];
- char CarRegistration[7];
- char FuelTankSize[4];
- char MainFuelCapacity[4];
- int NumberOfSeats;
- float MilesPerGallon();
- int RepairsPerMile();
- float AveMilesUsed();
- AllCars(int totalmilesdriven, int tankfillingaccumulation, int numberofrepairs, int taxrate, char insurancegroup[1], int tyrechangecount, int datebookedout, int numberofdaysbooked, char fueltype[6], char carregistration[7], char fueltanksize[4], char mainfuelcapacity[4], int numberofseats ){
- TotalMilesDriven = totalmilesdriven;
- TankFillingAccumulation = tankfillingaccumulation;
- NumberOfRepairs = numberofrepairs;
- TaxRate = taxrate;
- InsuranceGroup[1] = insurancegroup[1];
- TyreChangeCount = tyrechangecount;
- DateBookedOut = datebookedout;
- NumberOfDaysBooked = numberofdaysbooked;
- FuelType[6] = fueltype[6];
- CarRegistration[7] = carregistration[7];
- FuelTankSize[4] = fueltanksize[4];
- MainFuelCapacity[4] = mainfuelcapacity[4];
- NumberOfSeats = numberofseats;
- }
- };
- //Cars For Hire
- AllCars SportsCar1(0, 450, 0, 10, "S", 1, 00-00-00, 0, "Petrol", "MA01 CAR", "100 Litres", "60 Litres", 2);
- AllCars SportsCar2(0, 450, 0, 10, "SD", 1, 00-00-00, 0, "Diesel", "MA02 CAR", "120 Litres", "70 Litres", 4);
- AllCars SportsCar3(0, 450, 0, 10, "S", 1, 00-00-00, 0, "Petrol", "MA03 CAR", "100 Litres", "60 Litres", 4);
- AllCars SportsCar4(0, 450, 0, 10, "SD", 1, 00-00-00, 0, "Diesel", "MA04 CAR", "120 Litres", "70 Litres", 5);
- AllCars FourByFourCar1(0, 600, 1, 10, "O", 2, 00-00-00, 0, "Petrol", "MA05 CAR", "150 Litres", "80 Litres", 4);
- AllCars FourByFourCar2(0, 600, 1, 10, "OD", 2, 00-00-00, 0, "Diesel", "MA06 CAR", "170 Litres", "100 Litres", 4);
- AllCars FourByFourCar3(0, 600, 1, 10, "O", 2, 00-00-00, 0, "Petrol", "MA07 CAR", "150 Litres", "80 Litres", 5);
- AllCars FourByFourCar4(0, 600, 1, 10, "OD", 2, 00-00-00, 0, "Diesel", "MA08 CAR", "170 Litres", "100 Litres", 5);
- AllCars Van1(0, 800, 0, 10, "V", 1, 00-00-00, 0, "Petrol", "MA09 CAR", "100 Litres", "50 Litres", 2);
- AllCars Van2(0, 800, 0, 10, "VD", 1, 00-00-00, 0, "Diesel", "MA10 CAR", "110 Litres", "60 Litres", 2);
- AllCars Van3(0, 800, 0, 10, "V", 1, 00-00-00, 0, "Petrol", "MA11 CAR", "100 Litres", "50 Litres", 4);
- AllCars Van4(0, 800, 0, 10, "VD", 1, 00-00-00, 0, "Petrol", "MA12 CAR", "110 Litres", "60 Litres", 4);
- class SportsCars{
- public:
- bool SoftTop;
- bool Alloys;
- };
- class FourByFour{
- public:
- bool OffRoad;
- bool TowingHitch;
- };
- class Vans{
- public:
- bool HighTop;
- };
- int main(){
- system ("cls");
- cout << "!================== Welcome To Matt's Auto's ==================!" << endl;
- cout << "\n";
- cout << "!========== Please Select The Option You Wish To Use ==========!" << endl;
- cout << "\n";
- cout << "1) Book A Vehicle" << endl << "2) View Our Vehicles" << endl << "3) Exit" << endl;
- cout << "\n";
- cin >> Option;
- while(!Exit){
- switch(Option){
- case 1:{
- BookingMainMenu();
- break;
- }
- case 2:{
- ViewingMainMenu();
- break;
- }
- case 3:{
- Exit = true;
- break;
- }
- default:{
- }
- }
- }
- return 0;
- }
- void BookingMainMenu(){
- system ("cls");
- cout << "!======================== Book A Car ==========================!" << endl;
- cout << "\n";
- cout << "!========== Please Select From The Following Options ==========!" << endl;
- cout << "\n";
- cout << "1) Book A Sports Car" << endl << "2) Book A 4x4" << endl << "3) Book A Van" << endl;
- cin >> Option;
- system("PAUSE");
- if (Option == 1){
- BookingSportsCar();
- }
- else if (Option == 2){
- Booking4x4();
- }
- else if (Option == 3){
- BookingVan();
- }
- }
- void BookingSportsCar(){
- system ("cls");
- cout << "!==================== Sports Car Booking Form ====================!" << endl;
- cout << "\n";
- cout << "!============= Please Answer The Following Questions =============!" << endl;
- cout << "\n";
- cout << "What Fuel Type Would You Like?" << endl;
- cout << "\n";
- cout << "1) Petrol" << endl << "2) Diesel" << endl;
- cin >> Input[0];
- if (Input[0] == '1'){
- Requirement[0] == "Petrol";
- }
Advertisement
Add Comment
Please, Sign In to add comment