Question: NOTE: - ALL IN C++ - PLEASE PROVIDE CODE WITH COMMENTS & FULL CODE SCREENSHOTS!! A small airline has just purchased a computer for its

NOTE: - ALL IN C++ - PLEASE PROVIDE CODE WITH COMMENTS & FULL CODE SCREENSHOTS!!

A small airline has just purchased a computer for its net automated reservations system. You have been asked to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats).

Your program should display the following menu of alternatives -- Please type 1 for "Economy", Please type 2 for "Business", and Please type 3 for a passenger manifest, and type 4 to exit. If the person types 1, your program should assign a seat in the economy section (seats 1-5). If the person types 2, your program should assign a seat in the business section (seats 6-10). For either press of 1 or 2, your program needs to collect the name of the passenger. If the user types 3, your program should display a passenger manifest which lists the passenger names and their seating position on the plane.

Use a single-subscripted boolean array to represent the seating chart of the plane. Also use an array of strings to represent the names of the passengers. Initialize all of the elements of the array representing the seating chart of the plane to false. As each seat is assigned, set the corresponding elements of the array to true, and collect the name of the passenger being assigned to the seat. You are going to subdivide your program into functions.

Your program should, of course, never assign a seat that has already been assigned. When the economy section is full, your program should ask the person if it is acceptable to be placed in the business section (and vice versa). If yes, then make the appropriate seat assignment. If no, then print the message "Next flight leaves in 3 hours".

You are responsible for programming all the functionality of your program based on the rubric for you to get credit.

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!