You have been contracted by a start-up airline company to develop a system to be used in reservation of seats on their newly acquired plane. Write a program to be used to make reservations and assign seats on each flight of the airline’s only helicopter whose capacity is 12 seats. . Your program should display the following menu of options to the user: 1. Enter 1 to reserve a seat in Business Class 2. Enter 2 to reserve a seat in Economy Class 2 If the client making a reservation enters 1, the program should assign a seat in the Business class section (seats 1-10), and display the message that “You have been assigned Seat Number: xx ". If the person enters 2, the program should assign a seat in the economy section (seats 11-20), and display message “You have been assigned Seat Number: xx ". The program should print on the screen a boarding pass indicating the person’s seat number and whether it is in the business class or economy section of the plane. Use an array to represent the seating chart of the plane to initialize and assign the seats accordingly. The program should be able to check and ensure that a seat that has already been assigned it cannot be assigned again. When the business class section is full, the program should ask the person if it is acceptable to be placed in the economy section (and vice versa). If yes, then make the appropriate seat assignment. If no, then print the message "Sorry. Please wait for the next flight that leaves in 3 hours." Use both command line and graphical input/output as appropriate.
You have been contracted by a start-up airline company to develop a system to be used in reservation of
seats on their newly acquired plane. Write a
each flight of the airline’s only helicopter whose capacity is 12 seats.
.
Your program should display the following menu of options to the user:
1. Enter 1 to reserve a seat in Business Class
2. Enter 2 to reserve a seat in Economy Class
2
If the client making a reservation enters 1, the program should assign a seat in the Business class section
(seats 1-10), and display the message that “You have been assigned Seat Number: xx ". If the person enters
2, the program should assign a seat in the economy section (seats 11-20), and display message “You have
been assigned Seat Number: xx ". The program should print on the screen a boarding pass indicating the
person’s seat number and whether it is in the business class or economy section of the plane.
Use an array to represent the seating chart of the plane to initialize and assign the seats accordingly.
The program should be able to check and ensure that a seat that has already been assigned it cannot be
assigned again. When the business class section is full, the program should ask the person if it is acceptable
to be placed in the economy section (and vice versa). If yes, then make the appropriate seat assignment. If
no, then print the message "Sorry. Please wait for the next flight that leaves in 3 hours."
Use both command line and graphical input/output as appropriate.
Step by step
Solved in 3 steps with 2 images