Airline Reservation System Java



The primary objective of project Airline Reservation System in Java is to provide the online ticket & seat reservation facility of Domestic and International Flights and also provide details about flight departures. The present manual system is very frustrating and sluggish. This manual system is vulnerable to errors and quite often the approach to various problems is unstructured. With the advancement of technology if we don’t upgrade our system then our business will be in losses. The technical systems provides the tools of latest trend i.e. computers printers, fax, Internet etc. The systems with this technology are extremely fast, accurate, user-friendly and reliable.

Need of automated Airlines system
A few variables which direct us to produce a brand new system are given below -:
1) Faster System
2) Accuracy
3) Reliability
4) Informative
5) Reservations and cancellations from any where to any place

In this Java project, we will focus on ticket booking function. This function will take the user inputs like their requirements. After entering all requirements in this application, it will look into the back-end & provide details about flights. When we open the application we can find the basic information (basic fair & discounts) about today flight timings.

Online Airline Reservation Management System project is a web application which is developed in Java Servlet platform. This Java Servlet project with tutorial and guide for developing a code. Airline Reservation System in Java; Question. Design For this project, you will need to design and implement the following classes (at a minimum): Reservation Class:. The class should store the first name, last name, flight.

This Airline Reservation System in Java project primarily contains two important modules
Domestic Flights: In domestic flights module the system allows customers to create their login and they can search their needs of domestic flights, if any flight is available they can book tickets.
International Flight: In International flights module the system allows users to create their login and they can search their requirements of international flights, if any flight is available they can book the International flight tickets.

In the system analysis phase I have observed the system by visiting Indira Gandhi Airport. In this phase initially I have designed E-R diagram of the processes, to be able to determine various entities and relation ship set ,entity set, attributes, link attributes.

This project contains lot of scope of development. Nevertheless its overall look and feel provides rough image of an existing automation system.

Design
For this project, you will need to design and implement the following classes (at a minimum):
Reservation Class:
• The class should store the first name, last name, flight price, seat number and seat letter.
The class should provide the following methods, at a minimum:
• print: Returns a String that contains the information in the reservation
• getPrice: Returns the price of the reservation
ReservationSystem Class:
• The class should store an ArrayList of Reservations.
The class should provide the following methods:
• addReservation: Takes as input last name, first name, price, seat number and seat letter and creates a Reservation with this information. Add the reservation to the list of reservations.
• addReservation: Prompts the user for the info needed to make a new reservation. Add the reservation to the list of reservations.
• findReservation: find a reservation by first and last name and returns it
• viewReservations: prints all reservations using System.out. Use the print method provided byAirline Reservation System Java
Reservation
• uploadReservations: asks the user for a file and reads in all the reservations from a file and saves them in the ArrayList. Uses the addReservation method for help.
• downloadReservations: takes a file as input and writes the reservations to the file. Use the
System

Airline Reservation System Java Project Code

print method provided by Reservation
• updateReservation: asks the user for the first and last name of the reservation to update and then asks for the data to be updated and updates the reservation.
• getTotalPrice: Calls getPrice on each individual Reservation and adds them all up
Documentation:
All methods implemented should have javadoc comments written for them.
Program Input:
Your program will display a welcome message to the user and a menu of options for the user to choose from.
After completing a task, the main menu will be displayed again.
Program Options
Option 1: Upload Reservations
If the user chooses this option, the program will
a. Prompt the user for the file that contains the reservations.
b. Read in the records into the ReservationSystem.
Input File Format:
LastName FirstName Price SeatNumber SeatLetter Sample Input File:
Bob Mike 200 23 B
Matt Benjamin 178 15 A
Keller Helen 135.99 6 D
Tim Mary 210.77 12 B
Use the uploadReservations method to upload the reservations to the ReservationSystem.
Option 2: New Reservation
This option will prompt the user for the information needed to make 1 reservation and store it in the
ReservationSystem.
You need to make sure that the seat number is between 1-30. You need to make sure the seat letter is either A, B, C, D or E.
Option 3: Update Reservation
When this option is selected, the program will ask for the first and last name of the reservation and prompt the user for the seat number and seat letter. Use the updateReservation method for this task.
Option 4: View All Existing Reservations
If the user chooses this option, the program will print to the screen all the reservations’ information. Use the viewReservations method for this task.
Sample Output:
Name: Mike Bob, Price: 200, Seat: 23B Name: Benjamin Matt, Price: 178, Seat: 15A Name: Helen Keller, Price: 135.99, Seat: 6D Name: Mary Tim, Price: 210.77, Seat: 12B
Option 5: Find Reservation
If the user chooses this option, the program will prompt the user for their first and last name and search for a reservation with that first and last name combination and display it to the screen. If no reservation is found, a message will be displayed indicating that. Use the findReservation method for this task.
Option 6: Download Statistics
If the user chooses this option, the program will create a statistics file with the following data:
a. Printout of all reservations – use the downloadReservations method for this task
b. Sorted customer names alphabetically (by last name)
c. Lowest flight price

Airline Reservation System Java Github

d. Highest flight price

Airline Reservation System In Java Project

e. Total cost of reservations – use the getTotalPrice method in the ReservationSystem
class
The statistics file will have the same name as the input file (from option 1) but with _stats.txt
appended to it.
For example, if the input file was named reservations.txt, the stats file will be named
reservations_stats.txt.
Note: It will remove the .txt from reservations.txt, before adding the _stats.txt. It will NOT create a file with the name reservations.txt_stats.txt. You can use the string substr method to remove the last 4 characters from the file name.
Write a static function called CreateStatsFile to do this task. Choose the appropriate parameters and return type.
Option 5: Exit the Program
If the user chooses this option, the program will exit.
Note: If any other option (other than exit) is chosen, the task will be performed and then the menu will be displayed again.