Question: Write a program that assigns passengers seats in an airplane. Assume the airplane has 7 rows of 4 seats: 1 A B C D 2

Write a program that assigns passengers seats in an airplane. Assume the airplane has 7 rows of 4 seats:

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 Your program should display the available seats in the airplane and ask the user to enter a row number and seat letter. If that seat is open, tell the user what their seat number is and update the available seats by placing an 'X' in the occupied seat. If the seat is already occupied, inform the user with relevant output. Your program should allow the user to continue booking seats until they quit the program or there are no empty seats left.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!