Question: In C++. Write a program that can be used to assign seats for a commercial airplane and print out the ticket total. The airplane has

In C++.

Write a program that can be used to assign seats for a commercial airplane and print out the ticket total. The airplane has 13 rows, with row 7 being the Emergency Exit row. Each row has 7 seats, there are two seats on each side of the plane and three seats in the middle with aisles on both sides. Rows 1 and 2 are considered first class with tickets for this specific flight being $872.00 round trip. Rows 3 - 6 are business class with tickets at $697.60, and rows 7 through 13 are economy class with tickets at $436.00, however Emergency Exit row seats have an extra fee of $32.00 and passengers purchasing those seats must confirm that they are 16 years of age or older. Your program must prompt the user to enter the following information:

a. Ticket type (first class, business class, or economy; keep in mind the special circumstances for emergency row seats)

b. Desired seat(s)

Once all seats are selected there should be a 9% tax and the total should be displayed to the user.

Output the seating plan in the following form:

A B | C D E | E F
ROW 1 * X | * * * | X X
ROW 2 * X | * X * | * *
ROW 3 * * | X X X | * *
ROW 4 X X | * * * | X *
ROW 5 * X | * * X | * *
ROW 6 * X | * * * | X *
ROW 7 * * | * * * | * *
ROW 8 * X | * * X | X *
ROW 9 X * | * * * | X X
ROW 10 * X | * * X | * *
ROW 11 X X | * * * | * X
ROW 12 * * | X * X | * *
ROW 13 * * | * * * | * X

Here the * indicates that a seat is available; X indicates that the seat is occupied; | indicates the aisle of the plane. Make this a menu-driven program; show the user's choices (this is your starting seats, so make sure that seats already taken remain taken) and allow the user to make the appropriate selection of seats.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!