Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this assignment. The array is 4x4 with first class being first two rows, and economy being second two. Window seats are far

image text in transcribed

Need help with this assignment. The array is 4x4 with first class being first two rows, and economy being second two. Window seats are far left and right columns with aisle being the middle two. Thanks

Assignment #: 2-Airline Java Assignment #:2-Airline Java For assignment - see below Assignment: Student Name: Student #: A small airline bas just purchased a computer for its new automated reservations system. You've been asked to develop the new system. You are to write an application to assign scats on cach flight of the airline's only plane (capacity 16 scats-i.c. 4x4 2D array) Marking Rubric: Your application will ask users for both their class and seat type preferences. A typical interface will ask "Please enter passenger name" "Please type 1 fo First Class or 2 for Economy" then Please type 1 for window and 2 for Isle. Your application should then display a boarding pass indicating the person's name, seat mamber (eg Row 1 Seat 1), and class. Other than the seat being taken, there is no need to retain ticket information once the ticket has been produced unless attempting the rescarch component. Generic Marks (25 10% Program done to specification (i.e. no logic, syntax or validation errors, correct output, all project specific complete and correct. 5% 10% The User interface is functi Code is well commented as to functionality, structures, formulas, etc. Variables are declared using the appropriate data type, all objects, variables and other program e ate and easy to use In the program's code, classes are determined by rows, seats by columns Use a two dimensional array of primitive type Boolean to represent the seating chart of the plane that is traversed using nested for loops Yon must nse a single 2D Boolean array for the entire airplane, not one for each class. 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 scat is no longer available. lemeuts are named a tely Project Specific Marks (65 Validation I 5% 5% 10% 5% 15% 15% Research Co 10% catch Your application should never assign a seat that has already been assigned. It is assumed that passcngers are class centric' and would choose any remaining scat in their prefered class before electing to move classes. In other words, class has precedence over aisle/window seating preferences. When a class seetion is full, your application should ask the person ifit's acceptable to be placed in the other class (and vice versa). If yes, ask for their seat type choice and make the appropriate seat assignment In any case where there are still seats available on the aircraft but not one that is acceptable to the passenger, display the message "Next flight leaves in 3 hours and return to processing the next passenger in line. If the whole plane is full, display the same message and provide a mcans to exit the program. te use of while, do while. for Appropriate use of selection (if, if else, case te inclusion and use of a 2D e use of separate functions (e.g. display, book, validate, etc nt Marks (10) Produce a report of all passengers in alphabetic order with their corresponding seat numbers. TOTAL addition, your application must . Be able to serve several passengers before it closes. It would be wise to provide a means of closing In 100 (i.c. type -1 to exit) the application before the aircraft is full You program does not need to process multiple airplanes before shutting down. The Research Component must be implemented (coded), not just "reseched" to be graded and it will not affect your "Project functions to specification mark if it is not included. . Display a visual representation of the seating on the aircraft when the application starts and each .On the tickets that the passenger sees, seats will be referred to by their array row and col numbers . Validation for the name field will include: not empty, letters only time a scat is booked. NB Citations Remember that citations must be provided for any code, algorihm, text or image copied from another source (e.g. the Web, a textbook, an online tutorial, etc). Not attributing appropriately (plagiarism) or using illegally copied materials (copytight breach) ae seus acdic offeaises. Ifyou are in doubt as to when ar how to cite, consult with your instructor and the resources provided by the college. 1. (E.g. Row 0, Col 0 becomes Row 1, Scat 1 on the ticket)

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

33. If the pdf of a measurement error X is f(x) , show that

Answered: 1 week ago