Airline Reservation System Java



Design

AIRLINE RESERVATION SYSTEM: A web application for airline reservation. By selecting your departure place, destination place and date to travel it shows flight details and price details. A Java toolkit of MATIP (Mapping of Airline Reservation, Ticketing, and Messaging Traffic over IP) within a Connection Framework. This will provide a set of libraries for optimized. 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.


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 by
Reservation

Airline Reservation System In Java Project

• 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
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.Delta airlines book a flight
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.

Airline Reservation System Java Project Code

Option 6: Download Statistics

American Airlines Record Locator Lookup

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 Project

d. Highest flight price
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

Airline Reservation System Java Code

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.

Airline Reservation System Code In Java

Note: If any other option (other than exit) is chosen, the task will be performed and then the menu will be displayed again.

Airline Reservation System Project In Java






Comments are closed.