Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I designed my own code and it has flaws in it. Can someone write this code for me?! Please and Thank you!!!! Its for a

I designed my own code and it has flaws in it. Can someone write this code for me?! Please and Thank you!!!! Its for a homework assignment! Highly confused
image text in transcribed
image text in transcribed
Page of 2 3. (45 points: Airline Reservations System) A small airline has just purchased a new system. (capacity: 10 seats). computer for its new automated reservations system. You have been asked to develop the You are to write an application to assign seats on each flight of the airline's only plane Your application should display the following altermatives: 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 firstclass 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 is 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 elements 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 cconomy section is full, your application should ask the person if it is 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." Your output should appear as follows: Please type 1 for First Class Please type 2 for Economy choice: 1 First Class. Seat #1 Please type 1 for First Class Please type 2 for Economy

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions

Question

Describe the role of the Bureau of Consumer Financial Protection.

Answered: 1 week ago