University Project: Object-Oriented Aviation Airlines Booking System

Verified

Added on  2023/06/10

|36
|4471
|354
Project
AI Summary
This document presents a student's project on developing an aviation airlines ticket booking system using Java and object-oriented programming (OOP) principles. The project includes detailed design documentation outlining the classes (Customer, Seat, Flight, and Home), objects, data structures (ArrayLists), and methods used to implement the system's functionalities. The technical description covers the menu-driven interface, conditional statements for user input, and algorithms for booking, canceling, and viewing seat availability. Code screenshots of the Java classes are provided, followed by the program's output demonstrating various functionalities such as booking flights, canceling bookings, viewing seat details, and generating management reports. The testing documentation includes a requirements analysis table with input, expected output, and actual output for different scenarios, along with a success analysis. The appendix contains the complete Java code for the Home class, demonstrating the program's structure and implementation. This comprehensive project showcases the practical application of OOP concepts in creating a functional ticket booking system.
Document Page
Running head: AVIATION AIRLINES
Aviation Airlines
Name of the student:
Name of the University:
Author note:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2
AVIATION AIRLINES
Table of Contents
Design Documentation...............................................................................................................3
Classes....................................................................................................................................3
Objects and Data Structures...................................................................................................5
Technical Description............................................................................................................7
Development..............................................................................................................................8
Code Screenshots...................................................................................................................8
Output...................................................................................................................................14
Testing Documentation............................................................................................................19
Appendix..................................................................................................................................25
Document Page
3
AVIATION AIRLINES
Design Documentation
In order to create a ticket booking system for the Aviation Airlines, a wide variety of
programming algorithms were introduced alongside using quite a few different classes and
data structures to store the respective objects and data members. Below is the list and
description of each of the classes, objects, data structures, member data and methods that
have been used in the program to implement this complex system.
Classes
Name Description
Customer This class is meant to
consist of all the data that
makes up a customer for the
company. In addition, the
getter methods have been
provided for this class as the
only necessary member
methods.
Seat This class makes the
blueprint for each seat of the
respective flights. It consists
of the booking-ID for each
seat when they are booked
by the customer, which is
generated by the generateID
method. In addition, it hold
Document Page
4
AVIATION AIRLINES
an instance of the customer
class to link him or her to
the particular seat and
another price data member
that is updated according to
the organizational rules.
Flight This class imitates each
instance of a flight which
are flying under the
company’s banner. It
consists of the source and
destination of the flight
alongside a list of 5 seat
class instances. Alongside
that, the class also has the
necessary getter methods.
Home This forms the base or the
driver class for the entire
program. This is where the
list of the three flights are
located and from here the
menu driven program
controls the functionalities
of the entire system. Further,
this class has data members
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
5
AVIATION AIRLINES
to keep track of the net
income and expenditure of
the company.
Objects and Data Structures
Name Type Description
flights ArrayList<Flight> This is a list of the flights
which are created from the
Flight class. Each object in
the array list represent one
of the three flights from the
system. These flights are
given the respective source
and destination values to
segregate them uniquely.
seats ArrayList<Seat> This is the list of 5 seat
objects that are available for
each of the 3 different flight
objects. Each seat object in
these lists will be created
according to the Seat class
design listings. Each seat
has an unique bookingID, a
price tag and the Customer
class object that will identify
Document Page
6
AVIATION AIRLINES
the customer who has
booked that particular seat.
customer Customer The Customer class objects
are created one at a time
within the Seat class,
whenever a new seat is
booked for a particular
flight. The customer objects
consist of the basic identity
details that is necessary for
any customer.
lastPrice Double[] This is a double type array
that keeps record of the
lastly updated price for each
of the three flights. Each of
the three elements in this
array represents the last
price for that particular
indexed flight. Values from
this array is passed on to the
seat class constructor when a
new seat is being booked.
Depending on the last price,
the next price of the seat is
set with the 28% increment.
Document Page
7
AVIATION AIRLINES
Technical Description
Firstly, the menu and the submenus were created using a series of necessary cases
inside a switch statement. This helps to identify each of user’s choice uniquely and perform
required actions accordingly. A while loop that keeps check of the exit request of the menu is
made to parent the entire menu switch cases. Inside every menu, the user input for choice is
checked with if-else conditional statements and appropriate actions are taken.
If the user chooses to book a ticket on a particular flight, then a conditional if
statement is used to check if the number of booked seats for that flight has already reached
maximum limit of 5 or not.
For removal of a booking, the passport id entered by the user is checked with all the
records present in the system. This is done with the help of For loops. The linear search
algorithm has been used in the process to spot a particular passport id and once it is found the
record is deleted and the counter returns to the calling function. Otherwise 0 is returned and
an error message is displayed. In order to display the seat details or the details about the
availability of seats, the same approach as above is undertaken.
When users choose to search for customer details based on the Booking-IDs, this data
is accessed with directly surfing through the array lists of the flights and seats, using
temporarily created individual objects of each type. These objects help to directly get
information about the necessary entities without having to identify the elements in the list
using indexes.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
8
AVIATION AIRLINES
Development
Code Screenshots
Flight Class
Seat Class
Document Page
9
AVIATION AIRLINES
Customer Class
Home Class
Document Page
10
AVIATION AIRLINES
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
11
AVIATION AIRLINES
Document Page
12
AVIATION AIRLINES
chevron_up_icon
1 out of 36
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]