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
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