Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include <fstream>
- #include <iomanip>
- using namespace std;
- // Seating System for a plane
- int main()
- {
- int seatingsystem;
- char letter;
- int number, classchoice, totalpayclass;
- int firstclass = 10000, business = 5000, premium = 2500, regular = 1500;
- cout << "\t Skysail Airline Seating Arrangement" << endl;
- cout << "" << endl;
- cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
- cout << " [COCKPIT] " << endl;
- cout << "" << endl;
- cout << " [FIRST CLASS SEATS]" << endl;
- cout << "" << endl;
- cout << " [A,3] [A,2] [A,1] [B,1] [B,2] [B,3]" << endl;
- cout << "" << endl;
- cout << " [A,6] [A,5] [A,4] [B,4] [B,5] [B,6]" << endl;
- cout << "" << endl;
- cout << " [A,9] [A,8] [A,7] [B,7] [B,8] [B,9]" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << " [BUSINESS CLASS SEATS]" << endl;
- cout << "" << endl;
- cout << " [C,3] [C,2] [C,1] [E,1] [E,2] [E,3]" << endl;
- cout << "" << endl;
- cout << " [C,6] [C,5] [C,4] [E,4] [E,5] [E,6]" << endl;
- cout << "" << endl;
- cout << " [C,9] [C,8] [C,7] [E,7] [E,8] [E,9]" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << " EMERGENCY EXIT" << endl;
- cout << "" << endl;
- cout << " [D,3] [D,2] [D,1] [F,1] [F,2] [F,3]" << endl;
- cout << "" << endl;
- cout << " [D,6] [D,5] [D,4] [F,4] [F,5] [F,6]" << endl;
- cout << "" << endl;
- cout << " [D,9] [D,8] [D,7] [F,7] [F,8] [F,9]" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "- - - - - - - - - - - L A V A T O R Y - - - - - - - - - - - - - -" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << " [PREMIUM ECONOMY SEATS]" << endl;
- cout << "" << endl;
- cout << " [G,3] [G,2] [G,1] [I,1] [I,2] [I,3]" << endl;
- cout << "" << endl;
- cout << " [G,6] [G,5] [G,4] [I,4] [I,5] [I,6]" << endl;
- cout << "" << endl;
- cout << " [G,9] [G,8] [G,7] [I,7] [I,8] [I,9]" << endl;
- cout << "" << endl;
- cout << " [H,3] [H,2] [H,1] [J,1] [J,2] [J,3]" << endl;
- cout << "" << endl;
- cout << " [H,6] [H,5] [H,4] [J,4] [J,5] [J,6]" << endl;
- cout << "" << endl;
- cout << " [H,9] [H,8] [H,7] [J,7] [J,8] [J,9]" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << " [ECONOMY SEATS]" << endl;
- cout << "" << endl;
- cout << " [K,3] [K,2] [K,1] [O,1] [O,2] [O,3]" << endl;
- cout << "" << endl;
- cout << " [K,6] [K,5] [K,4] [O,4] [O,5] [O,6]" << endl;
- cout << "" << endl;
- cout << " [K,9] [K,8] [K,7] [O,7] [O,8] [O,9]" << endl;
- cout << "" << endl;
- cout << " [L,3] [L,2] [L,1] [P,1] [P,2] [P,3]" << endl;
- cout << "" << endl;
- cout << " [L,6] [L,5] [L,4] [P,4] [P,5] [P,6]" << endl;
- cout << "" << endl;
- cout << " [L,9] [L,8] [L,7] [P,7] [P,8] [P,9]" << endl;
- cout << "" << endl;
- cout << " [M,3] [M,2] [M,1] [Q,1] [Q,2] [Q,3]" << endl;
- cout << "" << endl;
- cout << " [M,6] [M,5] [M,4] [Q,4] [Q,5] [Q,6]" << endl;
- cout << "" << endl;
- cout << " [M,9] [M,8] [M,7] [Q,7] [Q,8] [Q,9]" << endl;
- cout << "" << endl;
- cout << " [N,3] [N,2] [N,1] [R,1] [R,2] [R,3]" << endl;
- cout << "" << endl;
- cout << " [N,6] [N,5] [N,4] [R,4] [R,5] [R,6]" << endl;
- cout << "" << endl;
- cout << " [N,9] [N,8] [N,7] [R,7] [R,8] [R,9]" << endl;
- cout << "" << endl;
- cout << "" << endl;
- cout << "Please Input Your Desired Ticket Class:" << endl;
- cout << "1. A-B (First Class)" << endl;
- cout << "2. C-F (Business Class)" << endl;
- cout << "3. G-J (Premium Economy Class)" << endl;
- cout << "4. K-R (Economy Class)" << endl;
- cout << "" << endl;
- cout << "Please input choice here: ";
- cin >> classchoice;
- switch(classchoice)
- {
- case 1:
- cout << "You chose First Class!" << endl;
- cout << "Please Select Your Seat Letter (A-B): ";
- cin >> letter;
- switch(letter)
- {
- case 'A':
- cout << "Please Select Your Seat Number:" << endl;
- cout << "Seat No. 1, 4 ,7 - Aisle Seat" << endl;
- cout << "Seat No. 2, 5 ,8 - Middle Seat" << endl;
- cout << "Seat No. 3, 6 ,9 - Window Seat" << endl;
- cout << "Select: " << endl;
- cin >> number;
- cout << "Your Seat is " << letter << number << endl;
- switch(number){
- case 1:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 2:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 3:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 4:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 5:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 6:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 7:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 8:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 9:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- default:
- cout << "Enter a valid choice";
- break;
- case 'B':
- cout << "Please Select Your Seat Number:" << endl;
- cout << "Seat No. 1, 4 ,7 - Aisle Seat" << endl;
- cout << "Seat No. 2, 5 ,8 - Middle Seat" << endl;
- cout << "Seat No. 3, 6 ,9 - Window Seat" << endl;
- cout << "Select: " << endl;
- cin >> number;
- cout << "Your Seat is " << letter << number << endl;
- switch(number){
- case 1:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 2:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 3:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 4:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 5:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 6:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 7:
- totalpayclass = firstclass + 1500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 8:
- totalpayclass = firstclass + 2500;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- case 9:
- totalpayclass = firstclass + 5000;
- cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
- break;
- default:
- cout << "Enter a valid choice";
- break;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement