A small airline 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...


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

Extracted text: A small airline 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 airline's only plane (capacity: 20 seats). Your application should display the following alternatives: Please type 0 for First Class and Please type 1 for Economy. If the user types 0, your application should assign a seat in the firstclass section (seats 1–5). If the user types 1, 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 it'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 firstclass section (and vice versa). If yes, make the appropriate seat assignment. If no, display the message "Next flight leaves in 1 hours."

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here