Question: JAVA Please make comments on each thing thank you Write a program to assign passengers seats in an airplane. Assume a small airplane with seat
JAVA Please make comments on each thing thank you
Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numberings 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 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 look like the following: 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
After displaying the seats available, the program should prompt for the seat desired, the user can type in a seat, and then the display of available seats should be updated. This continues 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 should say that that seat is occupied and ask for another choice.

You will be selecting seats for this airplane. 1 ABCD 2 4 ABCD SABCD You will input the seat selection using the row number and then the seat letter (ex - 38) Please enter the seat number or Q to quit. 1 1 ABXD 2 ABCD 3 4 ABCD 5 ABCD 6 ABCD 7 ABCD Please enter the seat number or Q to quit. 1 ABXD 2 4 5 A 7 ABCD Please enter the seat number or Q to quit. 5D 1 2 3 XBCD 4 SABCX 6 7 Please enter the seat number or to quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
