Advertisement
jhnksr

sittingsystem

Oct 9th, 2023
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 8.90 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <fstream>
  4. #include <iomanip>
  5. using namespace std;
  6.  
  7.  // Seating System for a plane
  8.  
  9. int main()
  10. {
  11.    
  12.     int seatingsystem;
  13.         char letter;
  14.         int number, classchoice, totalpayclass;
  15.         int firstclass = 10000, business = 5000, premium = 2500, regular = 1500;
  16.        
  17.        
  18.         cout << "\t    Skysail Airline Seating Arrangement" << endl;
  19.         cout << "" << endl;
  20.         cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
  21.         cout << "                [COCKPIT] " << endl;
  22.         cout << "" << endl;
  23.         cout << "                        [FIRST CLASS SEATS]" << endl;
  24.         cout << "" << endl;
  25.         cout << "   [A,3] [A,2] [A,1]       [B,1] [B,2] [B,3]" << endl;
  26.         cout << "" << endl;
  27.         cout << "   [A,6] [A,5] [A,4]       [B,4] [B,5] [B,6]" << endl;
  28.         cout << "" << endl;
  29.         cout << "   [A,9] [A,8] [A,7]       [B,7] [B,8] [B,9]" << endl;
  30.         cout << "" << endl;
  31.         cout << "" << endl;
  32.         cout << "" << endl;
  33.         cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
  34.         cout << "" << endl;
  35.         cout << "" << endl;
  36.         cout << "" << endl;
  37.         cout << "                    [BUSINESS CLASS SEATS]" << endl;  
  38.         cout << "" << endl;
  39.         cout << "   [C,3] [C,2] [C,1]       [E,1] [E,2] [E,3]" << endl;
  40.         cout << "" << endl;
  41.         cout << "   [C,6] [C,5] [C,4]       [E,4] [E,5] [E,6]" << endl;
  42.         cout << "" << endl;
  43.         cout << "   [C,9] [C,8] [C,7]       [E,7] [E,8] [E,9]" << endl;
  44.         cout << "" << endl;
  45.         cout << "" << endl;
  46.         cout << "" << endl;
  47.         cout << "               EMERGENCY EXIT" << endl;   
  48.         cout << "" << endl;
  49.         cout << "   [D,3] [D,2] [D,1]       [F,1] [F,2] [F,3]" << endl;
  50.         cout << "" << endl;
  51.         cout << "   [D,6] [D,5] [D,4]       [F,4] [F,5] [F,6]" << endl;
  52.         cout << "" << endl;
  53.         cout << "   [D,9] [D,8] [D,7]       [F,7] [F,8] [F,9]" << endl;
  54.         cout << "" << endl;
  55.         cout << "" << endl;
  56.         cout << "" << endl;
  57.         cout << "- - - - - - - - - - - L A V A T O R Y - - - - - - - - - - - - - -" << endl;
  58.         cout << "" << endl;
  59.         cout << "" << endl;
  60.         cout << "" << endl;
  61.         cout << "                    [PREMIUM ECONOMY SEATS]" << endl; 
  62.         cout << "" << endl;
  63.         cout << "   [G,3] [G,2] [G,1]       [I,1] [I,2] [I,3]" << endl;
  64.         cout << "" << endl;
  65.         cout << "   [G,6] [G,5] [G,4]       [I,4] [I,5] [I,6]" << endl;
  66.         cout << "" << endl;
  67.         cout << "   [G,9] [G,8] [G,7]       [I,7] [I,8] [I,9]" << endl;
  68.         cout << "" << endl;
  69.         cout << "   [H,3] [H,2] [H,1]       [J,1] [J,2] [J,3]" << endl;
  70.         cout << "" << endl;
  71.         cout << "   [H,6] [H,5] [H,4]       [J,4] [J,5] [J,6]" << endl;
  72.         cout << "" << endl;
  73.         cout << "   [H,9] [H,8] [H,7]       [J,7] [J,8] [J,9]" << endl;
  74.         cout << "" << endl;
  75.         cout << "" << endl;
  76.         cout << "" << endl;
  77.         cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
  78.         cout << "" << endl;
  79.         cout << "" << endl;
  80.         cout << "" << endl;
  81.         cout << "                         [ECONOMY SEATS]" << endl;
  82.         cout << "" << endl;
  83.         cout << "   [K,3] [K,2] [K,1]       [O,1] [O,2] [O,3]" << endl;
  84.         cout << "" << endl;
  85.         cout << "   [K,6] [K,5] [K,4]       [O,4] [O,5] [O,6]" << endl;
  86.         cout << "" << endl;
  87.         cout << "   [K,9] [K,8] [K,7]       [O,7] [O,8] [O,9]" << endl;
  88.         cout << "" << endl;
  89.         cout << "   [L,3] [L,2] [L,1]       [P,1] [P,2] [P,3]" << endl;
  90.         cout << "" << endl;
  91.         cout << "   [L,6] [L,5] [L,4]       [P,4] [P,5] [P,6]" << endl;
  92.         cout << "" << endl;
  93.         cout << "   [L,9] [L,8] [L,7]       [P,7] [P,8] [P,9]" << endl;
  94.         cout << "" << endl;
  95.         cout << "   [M,3] [M,2] [M,1]       [Q,1] [Q,2] [Q,3]" << endl;
  96.         cout << "" << endl;
  97.         cout << "   [M,6] [M,5] [M,4]       [Q,4] [Q,5] [Q,6]" << endl;
  98.         cout << "" << endl;
  99.         cout << "   [M,9] [M,8] [M,7]       [Q,7] [Q,8] [Q,9]" << endl;
  100.         cout << "" << endl;
  101.         cout << "   [N,3] [N,2] [N,1]       [R,1] [R,2] [R,3]" << endl;
  102.         cout << "" << endl;
  103.         cout << "   [N,6] [N,5] [N,4]       [R,4] [R,5] [R,6]" << endl;
  104.         cout << "" << endl;
  105.         cout << "   [N,9] [N,8] [N,7]       [R,7] [R,8] [R,9]" << endl;
  106.         cout << "" << endl;
  107.         cout << "" << endl;
  108.         cout << "Please Input Your Desired Ticket Class:" << endl;
  109.         cout << "1. A-B (First Class)" << endl;
  110.         cout << "2. C-F (Business Class)" << endl;
  111.         cout << "3. G-J (Premium Economy Class)" << endl;
  112.         cout << "4. K-R (Economy Class)" << endl;
  113.         cout << "" << endl;
  114.    
  115.        
  116.         cout << "Please input choice here: ";
  117.         cin >> classchoice;
  118.  
  119.         switch(classchoice)
  120.         {
  121.  
  122.             case 1:
  123.             cout << "You chose First Class!" << endl;
  124.             cout << "Please Select Your Seat Letter (A-B): ";
  125.             cin >> letter;
  126.                 switch(letter)
  127.                
  128.                 {
  129.                  case 'A':
  130.             cout << "Please Select Your Seat Number:" << endl;
  131.             cout << "Seat No. 1, 4 ,7 - Aisle Seat" << endl;
  132.             cout << "Seat No. 2, 5 ,8 - Middle Seat" << endl;
  133.             cout << "Seat No. 3, 6 ,9 - Window Seat" << endl;
  134.             cout << "Select: " << endl;
  135.             cin >> number;
  136.             cout << "Your Seat is " << letter << number << endl;
  137.                 switch(number){
  138.                     case 1:
  139.                         totalpayclass = firstclass + 1500;
  140.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  141.                         break;
  142.                     case 2:
  143.                         totalpayclass = firstclass + 2500;
  144.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  145.                         break;
  146.                     case 3:
  147.                         totalpayclass = firstclass + 5000;
  148.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  149.                         break;
  150.                     case 4:
  151.                         totalpayclass = firstclass + 1500;
  152.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  153.                         break;
  154.                     case 5:
  155.                         totalpayclass = firstclass + 2500;
  156.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  157.                         break;
  158.                     case 6:
  159.                         totalpayclass = firstclass + 5000;
  160.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  161.                         break;
  162.                     case 7:
  163.                         totalpayclass = firstclass + 1500;
  164.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  165.                         break;
  166.                     case 8:
  167.                         totalpayclass = firstclass + 2500;
  168.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  169.                         break;
  170.                     case 9:
  171.                         totalpayclass = firstclass + 5000;
  172.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  173.                         break;
  174.                     default:
  175.                     cout << "Enter a valid choice";
  176.                     break;
  177.                 case 'B':
  178.                     cout << "Please Select Your Seat Number:" << endl;
  179.             cout << "Seat No. 1, 4 ,7 - Aisle Seat" << endl;
  180.             cout << "Seat No. 2, 5 ,8 - Middle Seat" << endl;
  181.             cout << "Seat No. 3, 6 ,9 - Window Seat" << endl;
  182.             cout << "Select: " << endl;
  183.             cin >> number;
  184.             cout << "Your Seat is " << letter << number << endl;
  185.                 switch(number){
  186.                     case 1:
  187.                         totalpayclass = firstclass + 1500;
  188.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  189.                         break;
  190.                     case 2:
  191.                         totalpayclass = firstclass + 2500;
  192.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  193.                         break;
  194.                     case 3:
  195.                         totalpayclass = firstclass + 5000;
  196.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  197.                         break;
  198.                     case 4:
  199.                         totalpayclass = firstclass + 1500;
  200.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  201.                         break;
  202.                     case 5:
  203.                         totalpayclass = firstclass + 2500;
  204.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  205.                         break;
  206.                     case 6:
  207.                         totalpayclass = firstclass + 5000;
  208.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  209.                         break;
  210.                     case 7:
  211.                         totalpayclass = firstclass + 1500;
  212.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  213.                         break;
  214.                     case 8:
  215.                         totalpayclass = firstclass + 2500;
  216.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  217.                         break;
  218.                     case 9:
  219.                         totalpayclass = firstclass + 5000;
  220.                         cout << "Your total bill in this section is: " << totalpayclass <<".00"<< endl;
  221.                         break;
  222.                     default:
  223.                     cout << "Enter a valid choice";
  224.                         break;
  225.                 }    
  226.                 }
  227.                 }
  228.             }
  229.     return 0;
  230.  
  231.    
  232. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement