Question: PLEASE USE C++ LANGUAGE ONLY Option 1: The program calls a function that prompts users for the seat desired as a string (e.g., 3A, 7D,

 PLEASE USE C++ LANGUAGE ONLY Option 1: The program calls aPLEASE USE C++ LANGUAGE ONLY
Option 1: The program calls a function that prompts users for the seat desired as a string (e.g., 3A, 7D, etc.) and then determines the row number and column number of the array element that needs to be accessed. If the seat is available, it reserves it by assigning X to the seat and displays a message stating that the seat was reserved. Otherwise it displays a message stating that the seat is not available.
Option 2 (Cancel Reservation): The program calls a function that prompts users for the seat to be canceled as a string (e.g., 3A, 7D, etc.) and then determines the row number and column number of the array element that needs to be accessed. If the seat is available, the program displays an error message stating that the seat to be canceled has not been initially reserved. Otherwise it makes the seat available and displays a message stating that the seat reservation has been cancelled.

The aim of this project is to implement a seat reservation system fora passenger airplane. We assume a small airplane with 10 rows and 4 seats per row. We assume that the seat chart is initially stored in a file "chartIn.txt" in the following format: A B C D 2 ABCD 3 A B C D A B C D 5 A B C D 6 A B C D A B C D A B C D ABCD 10 ABCD The example given above means that seats 1A, 1B, 1C, ID, 2A, 2B, 2C, 2D, 3A, are all available. Note that the number 1, 2, 3 also belong to the file. Below is another example of data store in the file "chartIn.txt": A X C D A B C D 3 A B C D A B C D 5 A X CD 6 A B C D 7 A B C D A B C D 9 ABX D 10 A XX D This second example mentions that the following seats marked with X' are reserved: l B, 5B, 9C, 10B, 10C

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!