Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE USE C++ Language only. Question 1. The program should include a function that initially reads the seat chart from the file chartIn.txt and fill
PLEASE USE C++ Language only.
Question 1.
The program should include a function that initially reads the seat chart from the file chartIn.txt and fill out a 2-dimentional array called seatChart. It then display the following menu:
------------------------ Menu ---------------------------
1. Display Seat Chart
2. Reserve Seat
3. Cancel Reservation
4. Save Seat Chart to File
5. Statistics
6. Help
7. Quit
----------------------------------------------------- ---
Please Enter Your Choice (1-7):
This is what I have so far but please correct it:
void readFileDisplayMenu(ifstream& ins, array[], int)
{
int array[10][5];
ins.open("chartIn.txt");
while (!ins.eof())
{
for (int i = 0; i
{
for (int j = 0; j
ins >> array[i][j];
cout
}
}
cout
cout
cout
cout
cout
cout
cout
cout
cout
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 cout
}
Question 2:
Option 1 (Display Seat Chart): The program calls a function that displays the seat chart from the array seatChart using the format shown in the picture above.
Please use loops
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started