Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

(Airplane Seating Assignment) Write a program in JAVA that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with

(Airplane Seating Assignment) Write a program in JAVA 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions