Starting from:

$25

ITSE2321- Program 8 Solved

A small airline has just purchased a computer for its new automated reservations system.  You have been asked to develop the new system.  You are to write an application to assign seats on flight of the airline’s only plane (capacity: 10 seats).

 

Your 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 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 is assigned, set the corresponding element of the array to true to indicate that the seat is on 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."  End the program when all the ten seats on the plane have been assigned.

 

No input, processing or output should happen in the main method.  All work should be delegated to other non-static methods. Include the recommended minimum documentation for each method.  See the program one template for more details.

 

Run your program, with your own data, and copy and paste the output to a file.  Create a folder named, fullname_program8.  Copy your source code and the output file to the folder.  Zip the folder and upload it to Blackboard.

 

More products