Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A small airline has just purchased a computer for its new automated reservations system. You've been asked to develop the new system. You're to

 

A small airline has just purchased a computer for its new automated reservations system. You've been asked to develop the new system. You're to write an application to make reservations for passengers for the sole flight of the airline's only plane, a DC-3 with 7 rows of 3 seats (capacity: 21 seats). Your application should 1. Display a menu to view passenger boarding pass or make a reservation. If boarding pass is selected then request the passenger's name and telephone number, use the telephone number to correctly identify the passenger and display the boarding pass, then display the previous menu. If reservation is selected, then go to step 2 2. Ensure a seat is available, then request and read passenger information-name, age, gender (M/F), and 10-digit telephone number. Should the flight be full, display a message to that effect. 3. Allow the passenger to select an available seat from a seating chart that displays available (A) and not available (X) seats. The selection of a taken seat should not be allowed. The aircraft has 7 rows with 3 seats in each row 4. When the seat selection is complete, display the boarding pass that has the customer information and the selected seat. When transaction is complete, go to step 1 You are required to: 1. Create a passenger class with name, age, gender, and telephone number as instance variables, a two-dimensional static array for the seating arrangement, and a static variable to count the seats taken in that flight, along with instance and class methods. 2. Use an array list to store instances of passenger with valid reservations. 3. Use static methods in the driver class to minimize statements in main method. A variation of this problem is in your textbook (page 301 #7.19). I am not looking for a solution to the textbook problem

Step by Step Solution

There are 3 Steps involved in it

Step: 1

General Guidance The answer provided below has been developed in a clear step by step manner Step 1 ExplanationPlease refer to solution in this step Answer Passangerjava package myPack public class Pa... 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

An Introduction To Statistical Methods And Data Analysis

Authors: R. Lyman Ott, Micheal T. Longnecker

7th Edition

1305269470, 978-1305465527, 1305465520, 978-1305269477

More Books

Students also viewed these Computer Engineering questions

Question

What is a multivariate data set?

Answered: 1 week ago