Question: JAVA PROGRAMMING (Airplane Seating Assignment) Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with
JAVA PROGRAMMING
(Airplane Seating Assignment) Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 through 13 are economy class. Your program must prompt the user to enter the following information:
a. Ticket type (first class, business class, or economy class)
b. Desired seat
Output the seating plan in the following form:
|
| A | B | C | D | E | F |
| Row 1 | * | * | X | * | X | X |
| Row 2 | * | X | * | X | * | X |
| Row 3 | * | * | X | X | * | X |
| Row 4 | X | * | X | * | X | X |
| Row 5 | * | X | * | X | * | * |
| Row 6 | * | X | * | * | * | X |
| Row 7 | X | * | * | * | X | X |
| Row 8 | * | X | * | X | X | * |
| Row 9 | X | * | X | X | * | X |
| Row 10 | * | X | * | X | X | X |
| Row 11 | * | * | X | * | X | * |
| Row 12 | * | * | X | X | * | X |
| Row 13 | * | * | * | * | X | * |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
