in C#, Visual Basic Write an app for Boston Airlines that allows a customer to reserve a seat on the airline’s only plane (capacity: 10 seats). Radio buttons should allow the choice between First Class and Economy. The app should then assign a seat in the first-class section (seats 1–5) or the economy section (seats 6–10). Use a one-dimensional array of type bool 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 app should never assign a seat that has already been assigned. When the economy section is full, your app 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."
in C#, Visual Basic
Write an app for Boston Airlines that allows a customer to reserve a seat on the airline’s only plane (capacity: 10 seats).
Radio buttons should allow the choice between First Class and Economy.
The app should then assign a seat in the first-class section (seats 1–5) or the economy section (seats 6–10).
Use a one-dimensional array of type bool 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 app should never assign a seat that has already been assigned.
When the economy section is full, your app 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."
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images