To develop an airline reservation system.
The system should be able to provide the following:
- Accept passenger information.
- Assign an appropriate seat.
- Display the boarding pass.
1. Apply the object-oriented programming techniques of Java.
2. Write decision-making statements and control structures to solve problems.
3. Create user-friendly interfaces and apply event-handling techniques of Java.
4. Explore best practices for designing and developing applications.
A small airline has just purchased a computer for its new automated reservations system. You have been asked to design the logo and develop the new system.
Currently, the airline runs only one aircraft with a capacity of 10 seats and has three types of travel sections ¡V First, Business, and Economy. It is identified by an aircraft number and type. The system should generate a user-friendly interface to accept the passenger¡¦s first name, last name, date of birth and choice of travel section. The system should be able to assign seats on each flight of the airline¡¦s only plane.
Type of travel selection Denoted as Seat numbers assigned
First F 1001-1003
Business B 1004-1006
Economy E 1007-1010
If a seat has already been assigned, it cannot be used to assign to another person on that flight. If a particular section is full, based on the seat availability, it should ask the user if he/she wishes to upgrade.
Scenario If seat is available If seat is not available
When Economy section is full Ask and Assign in Business section Print an appropriate message along with the message ¡§Next flight leaves in 4 hours.¡¨
When Business section is full Ask and Assign in First-class section Print an appropriate message along with the message ¡§Next flight leaves in 4 hours.¡¨
When First-class section is full Ask for user¡¦s choice, and assign the seat (Business/Economy) Print an appropriate message along with the message ¡§Next flight leaves in 4 hours.¡¨
Once all the information has been entered, the system should print a boarding pass (on the screen itself), indicating the following:
- Flight number (since there is only one aircraft, this can have only one value).
- Date of the flight (this can be assumed to be the current date as per your computer)
- Passenger¡¦s first name and last name
- Passenger¡¦s date of birth
- Type of travel section.
- Passenger¡¦s seat number.
Add an extra feature to enhance the functionality of your application.
- Use NetBeans 6.7.1 as the integrated development environment.
- The project name must begin have the pattern as <Firstname><Lastname><Project Name>.
- Use appropriate comment entries to signify your course code, student ID, last name and first name at the beginning of each program.
- All user-defined variable names must begin with the first three characters of your last name.
- Use object-oriented techniques to enhance the functionality of your system (for example ?³ classes, constructors, methods, inheritance, composition, polymorphism Date class, etc.)
- Arrays can be used to add effectiveness.
- Apply exception-handling techniques of Java.
- Appropriate validations must be done.
- Ensure that the interface/s generated by your program are user-friendly and give a professional look. The system must be a GUI.