Question

c++ problem

can someone help me with this coding this please

Write a program to assign passengers seats in an airplane. Assume a small plane with seat numbering as follows.
1 A B C D
2 A B C D
3 A B C D
4 A B C D
5 A B C D
6 A B C D
7 A B C D
8 A B C D
9 A B C D
The program should display the seat pattern, with an X marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should looklike this:
1 X B C D
2 A X C D
3 A B C D
4 A B X D
5 A B C D
6 A B C D
7 A B C D
8 A B C D
9 A B C D
After displaying the seats available, the program prompts for the seat desired, the user types in a seat, and then the display of the available seats is updated. Thiscontinues until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program shouldsay that the seat is occupied and ask for another choice.
Your program should read the current seat assignment from a file and when the program ends it should update the file with the new seating assignment.
Your program should have at least three functions: a function to read the seat assignment from a file, a function to assign seats, and the function to write theseating assignment back to the file when the program ends.

Solutions

Expert Solution
No answers


Submit Your Answer