Question: Using C: At the start of the program, your program should give the following menu options to the user:(1)Choose a seat!(2)prints a boarding pass for

Using C:

At the start of the program, your program should give the following menu options to the user:(1)Choose a seat!(2)prints a boarding pass for a chosen seat number indicating the person's name, seat number and whether its in the first class or business class or economy section of the plane (For example: JOHN DOE, SEAT: B2, Level: First Class). User will provide the seat number for this option and if no passenger is assigned to the selected seat, you should print a message, Seat Unassigned - No Boarding pass available. Try Again!. If the seat was blocked due to Covid, print the appropriate message too.(3)Display the seating map/chart showing all 140 seats and indicating if each seat is filledand which seats are blocked.(4)prints a passenger manifest showing names of all passengers and their seat numbers in a tabular format. The default view prints the manifest organized by seat numbers. User may choose the option to print the manifest in alphabetical format. (5)Quit the program

Your program must show the above menu if user does not select the valid input option. Your program must not quit until Quit option is selected.If user likes to choose a seat, the program should display the following menu of alternatives:Please type F for "first class"Please type B for "business class"Others will be economy class. If the person types F, then your program should assign a seat in the first class section (rows 1-3). If the person types B, then your program should assign a seat in the business class section (rows 4-7). For others, your program should assign a seat in the economy section (rows 820). The first row of economy section (row 8) has extra leg room and is consider Priority economy row. Seat Assignment is done using random numbers generator (i.e., Use a random number generator to select the seat -row number and column, and then check if that seat is un-assigned).Lets call this INITIAL SEAT SELECTION.Confirm with the user if he/she wants a Window seat or Aisle seat. If user doesnt want the selected seat, repeat the random seat assignment process again (repeat it not more than 3 times and if user cannot make up his/her mind, let them travel on next flight)!Your program should, of course, never assign a seat that has already been assigned or has been blocked due to Covid. When the first class section is full, your program should ask the person if its acceptable to be placed in the business class. Similarly, if the business section is full, ask the user if economy section is acceptable. For economy class, user should have the choice of selecting seat in priority economy row if available. If user doesnt like the seat, he/she can always choose the next flight!After the INITIAL SEAT SELECTION, User should have the choice of upgradingto the higher class (i.e., business class or first class) if a seat is available. User may also downgrade from higher class (i.e., first class or business class) if they wish. To keep things simple, you should inquire about upgrade/downgrade options after the INITIAL SEAT SELECTION is done. If user chooses to changehis/her choice, then make the appropriate seat assignment and show the FINAL SEAT ASSIGNMENT. If no seat is available in the chosen section, then confirm with the user if they still want to use the INITIAL SEAT SELECTION or print the message "Next flight leaves in 3 hours."Note: Airlines typically use a seating map/chart similar to the one shown below. Design your own version of seating chart (you dont have to use graphics or colors)

Use a double-subscripted (2D) array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding element of the array to 1 to indicate that the seat is no longer available.Note: You may need to maintain a separate array to store passenger names. This can be done in several ways including using 1-dimensional or 2-dimensionsla arrays. You will also have to think carefully about how to print the manifest in alphabetical order.Note: Write a modular program, a program which uses appropriate functions to complete the task. Dont write all the code in main function.

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!