Question: The information in the file is saved in a two dimensional array called seatChart. Question 1 (Reserve Seat): The program calls a function that prompts
The information in the file is saved in a two dimensional array called seatChart. Question 1
(Reserve Seat): 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.
Question 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 for a 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: 1 A B C D 2 A B C D 3 A B C D A B C D 5 A B C D 6 A B C D 7 A B C D A B C D 9 A B C D 10 A B C D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
