Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need to get a C++ program ( object oriented design , using STL) to support the c

ID: 3760657 • Letter: N

Question

Need to get a C++ program ( object oriented design , using STL) to support the client-side of an airline reservation system for airline reservation agents. The program does not manage user accounts, it only shows status of the flights. It allows the reservation agent to perform basic functions such as book and cancel reservations, display information such as boarding passes and seat assignments on the flight.

NOTE: All data for flights, passengers, etc. should be read from a file at the start of the program. The program should only save data back to file when given a command by the user and when the program is exiting.

Detailed Description

The system should allow a user to perform the following functions:

Book a new reservation

Cancel a reservation

Display boarding pass for a passenger

Display flight schedule (sorted by any field)

Display available cities (sorted by name or code)

List passengers on a given flight and seat assignments (sorted by name or seat)

The airline has two types of aircraft. The type A plane irst has 5 rows. Each row has seats A, B, C, and D arranged as the following (The aisle is indicated with an X):

1A

1B

X

1C

1D

2A

2B

X

2C

2D

3A

3B

X

3C

3D

4A

4B

X

4C

4D

5A

5B

X

5C

5D

The second ptype of plane has 5 rows with seats A, B, and C in the following configuration:

1A

X

1B

1C

2A

X

2B

2C

3A

X

3B

3C

4A

X

4B

4C

5A

X

5B

5C

The airline flies between the following cities:

ATL

Atlanta

ORL

Orlando

DFW

Dallas/Fort Worth

NYC

New York City

HAW

Hawaii

CHI

Chicago

LAX

Los Angeles

The flight schedule is the same every day of the week. please use the above cities to create some schedules

Your system must make sure that a flight is not overbook, and if a flight is booked it should suggest other flights to the same destination. The boarding pass should include the flight details including the seat number and the number of frequent flyer miles that can be earned.

Input

The input is all done via interactive data entry. You may use menus, commands, etc. The interface is your choice.

           

Output

Output is done to the screen, but the program should also save all data between execution using one or more files. This means that when the system restarts, the reservations that have been made should reload.

1A

1B

X

1C

1D

2A

2B

X

2C

2D

3A

3B

X

3C

3D

4A

4B

X

4C

4D

5A

5B

X

5C

5D

Explanation / Answer

#include <bits/stdc++.h>
using namespace std;

// Type 1 Reservation System
bool** aircraft_1 = new bool*[5];
for (int i = 0; i < 5; i++){
   aircraft_1[i] = new bool[4];
   for(int j = 0; j < 4; j++)
       aircraft_1[i][j] = false;
}

// Type 2 Reservation System
bool** aircraft_2 = new bool*[5];
for (int i = 0; i < 5; i++){
   aircraft_2[i] = new bool[4];
   for(int j = 0; j < 4; j++)
       aircraft_2[i][j] = false;
}

int main(){
   while (true){
       cout << "1. Book a new Reservation " << endl;
       cout << "2. Cancel a reservation " << endl;
       cout << "3. Display boarding pass for a passenger " << endl;
       cout << "4. Display flight schedule (sorted by any field) " << endl;
       cout << "5. Display available cities (sorted by name or code) " << endl;
       cout << "6. Exit " << endl;
       cout << "Choose an option " << endl;
       int n;
       cin >> n;
       if (n == 1){
           int air_type;
           cout << "Select aircraft (1 or 2) " << endl;
           cin >> air_type;
           if (air_type == 1){
               cout << "Select your seat " << endl;
           }
           else{

           }
       }
       else if (n == 6)
           break;
   }
}

# will complete it soon

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote