Question: Java BJECT ORIENTED PROGRAMMING CS102 QII. (Airdine Reservations System) A small airdline has just purchased a computer for its new automated reservations system. You've been

Java  Java BJECT ORIENTED PROGRAMMING CS102 QII. (Airdine Reservations System) A small
airdline has just purchased a computer for its new automated reservations system.
You've been asked to develop the new system. You're to write an

BJECT ORIENTED PROGRAMMING CS102 QII. (Airdine Reservations System) A small airdline has just purchased a computer for its new automated reservations system. You've been asked to develop the new system. You're to write an application to assign seats on each flight of the airlines application should display the following alternatives: Please type 1 for First Class and Please type 2 for Economy. If the user types 1, your application should assign a seat in the first class section (seats 1-5). If the user types 2, your application should assign a seat in the economy section (seats 6-10) Your application should then display a boarding pass indicating the person's seat number and whether i's in the first-class or economy section of the plane. Use a one-dimensional array of primitive type boolean to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all the seats are empty. As each seat is assigned, set the corresponding element of the array to true to indicate that the seat is no longer available. Your application should never assign a seat that has already been assigned. When the economy section is full, your application should ask the person if it's acceptable to be placed in the first-class section (and vice versa). If yes, make the appropriate seat assignment. If no, display the message "Next flight leaves in 3 hours." Output only plane (capacity: 10 seats). Your Please type a for First class Please type 2 for Economy Please type 1 for First Class Please type 2 for Economy choice: First Class, s"at 1

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!