Question: C++ Airplane Seating Code Design and implement a program that assigns seats on an airplane. Assume the airplane has 20 seats in the first class

C++ Airplane Seating Code

Design and implement a program that assigns seats on an airplane. Assume the airplane has 20 seats in the first class (5 rows of 4 seats each, separated by an isle) and 180 seats in the economy class (30 rows of 6 seats each, separated by an isle). Your program should take three commands: add passengers, show seating, and quit. When passengers are added, ask for the class (first or the economy), the number of passengers traveling together (1 to 2 in the first class, 1 to 3 in the economy), and the seating preference (aisle or a window in the first class; aisle, center or window in economy). Then try to find a match and assign the seats. If no match exits, print a message. Follow the object printed design process.

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!