Question: I n basic, easy to understand C++, please help me with the part due at midnight! (Component 1) The aim of this project is to
I
n basic, easy to understand C++, please help me with the part due at midnight! (Component 1)
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 "chartln.txt" in the following format: A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D The example given above means that seats 1A, 1B, 1C, 1D, 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 "chartln.txt": A X C D A B C D A B C D A B C D A X C D A B C D A B C D A B C D A B X D A X X D This second example mentions that the following scats marked with 'X' are reserved: 1B, 5B, 9C, 10B, 10C. The program should include a function that initially reads the scat chart from the file "chartln.txt" and fill out a 2-dimentional array called seatChart. It then display the following menu: Display Seat Chart Reserve Seat Cancel Reservation Save Seat Chart to File Statistics Help Quit Below is a description of each option in the menu: Option 1 (Display Seat Chart): The program calls a function that displays the seat chart from the array seatChart using the format shown above. Option 2 (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, reserve it by assigning 'X' to the seat and display a message stating that the scat is reserved. Otherwise, display a message stating that the scat is not available. Option 3 (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 is not already reserved. Otherwise, make the seat available and display a message stating that the seat reservation has been cancelled. Option 4 (Save Seat Chart to File): The program calls a function that prompts users for a file name. Then it saves the chart to that file in the format shown in page 1. Option 5 (statistics): The program calls a function that displays the following statistics: Number of available scats, percentage of scats that are reserved (to one decimal place), list of window seats that are available, list of aisle seats that are available. By our definition the first and last seat in a row are window seats and all others are considered aisle seats. Option 6 (Help): the program calls a function that displays a detailed message on how to use the program. Option 7(Quit): The program displays a thank you message and terminates. By midnight. April 4, submit through canvas: A write-up of test cases you will use and WHY you chose that test case. A function decomposition method to describe all functions that you will implement in this project. Use arrow lines to indicate the relationship among all functions, and their calling sequence
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
