Question: Please use C++ in this problem. Write a program that assigns passengers seats in an airplane. Assume the airplane has 7 rows of 4 seats:

Please use C++ in this problem.

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.

Sample: AVAILABLESEATS: 1ABCD 2ABCD 3ABCD 4ABCD 5ABCD 6ABCD 7ABCD Enterrownumber:4 Enterseatletter:A Yourseatis4A. AVAILABLESEATS: 1ABCD 2ABCD 3ABCD 4XBCD 5ABCD 6ABCD 7ABCD Wouldyouliketobookanotherseat? EnterYforyesandanythingelsetoquit:Y AVAILABLESEATS: 1ABCD 2ABCD 3ABCD 4XBCD 5ABCD 6ABCD 7ABCD Enterrownumber:4 Enterseatletter:A Sorry,thatseatisalreadyoccupied. Wouldyouliketobookanotherseat? EnterYforyesandanythingelsetoquit:Y AVAILABLESEATS: 1ABCD 2ABCD 3ABCD 4XBCD 5ABCD 6ABCD 7ABCD Enterrownumber:4 Enterseatletter:B Yourseatis4B. AVAILABLESEATS: 1ABCD 2ABCD 3ABCD 4XXCD 5ABCD 6ABCD 7ABCD Wouldyouliketobookanotherseat? EnterYforyesandanythingelsetoquit:N

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!