Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone help me with this? I'm lost on where to even begin. The program is supposed to be written in JAVA. Write a program

image text in transcribed

Can anyone help me with this? I'm lost on where to even begin. The program is supposed to be written in JAVA.

Write a program that assigns seats on an airplane Assume that the airplane is a United Airlines 757-200 (see seating configuration below) The airplane has 24 seats in first class (6 rows of 4 seats each, separated by an aisle) ** Notice that first class rows start with row # 1 There are 158 seats in economy class (27 rows of 6 seats each, separated by an aisle). ** Notice that economy rows start at row # 7 and that row 7 only has two seats! aar 4080,10/1,szt1 22 23 24 25 26 27,28 29 30 31 32 3438 31 37 02 03 04 os Your program should take 5 commands When passengers are added, ask for: 1. the flight class (first or economy) 2. the number of passengers traveling 1. assign ( Request seats) 2. confirm (Confirm selected seats) 3. cancel (Abort assignment Process) 4. show (Display current seat map) 5. help (Display instructions) 6. quit (End program) together (1 to 4 in first class; 1 to 6 in economy) 3. the seating preference per passenger (aisle, window, or no preference in first class; aisle center, window, or no preference in economy). 4. Then try to find a match and assign adjacent seats in the same row that is nearest to the front of the aircraft. 5. Show results of seating assignment. 6. Show seat maps when requested 7. Show quick-glance instructions when requested 8. Quit program when requested. Write a program that assigns seats on an airplane Assume that the airplane is a United Airlines 757-200 (see seating configuration below) The airplane has 24 seats in first class (6 rows of 4 seats each, separated by an aisle) ** Notice that first class rows start with row # 1 There are 158 seats in economy class (27 rows of 6 seats each, separated by an aisle). ** Notice that economy rows start at row # 7 and that row 7 only has two seats! aar 4080,10/1,szt1 22 23 24 25 26 27,28 29 30 31 32 3438 31 37 02 03 04 os Your program should take 5 commands When passengers are added, ask for: 1. the flight class (first or economy) 2. the number of passengers traveling 1. assign ( Request seats) 2. confirm (Confirm selected seats) 3. cancel (Abort assignment Process) 4. show (Display current seat map) 5. help (Display instructions) 6. quit (End program) together (1 to 4 in first class; 1 to 6 in economy) 3. the seating preference per passenger (aisle, window, or no preference in first class; aisle center, window, or no preference in economy). 4. Then try to find a match and assign adjacent seats in the same row that is nearest to the front of the aircraft. 5. Show results of seating assignment. 6. Show seat maps when requested 7. Show quick-glance instructions when requested 8. Quit program when requested

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_2

Step: 3

blur-text-image_3

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions