0% found this document useful (0 votes)
19 views17 pages

37 2w2 Report

The document outlines a flight booking system project developed by students, detailing its functionality for booking flights from Riyadh to Jeddah. It describes various classes such as Service, Booking, Ticket, Passenger, FlightTime, and FlightChecking, along with their methods and relationships. The main class includes user interaction for booking, cancellation, and displaying information, with error handling for invalid inputs.

Uploaded by

znk79shr2k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views17 pages

37 2w2 Report

The document outlines a flight booking system project developed by students, detailing its functionality for booking flights from Riyadh to Jeddah. It describes various classes such as Service, Booking, Ticket, Passenger, FlightTime, and FlightChecking, along with their methods and relationships. The main class includes user interaction for booking, cancellation, and displaying information, with error handling for invalid inputs.

Uploaded by

znk79shr2k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Programming Language 2 _CS 111T Project

FLIGHT
BOOKING SYSTEM

Student Academic
Student Name Student E-mail
Number
‫راﻣﺎ ﺻﺎﻟﺢ اﻟﻘﺣطﺎﻧﻲ‬ 445008447 [email protected]
‫ﻏدي ﻣﺣﻣد اﻟدوﺳري‬ 445008427 [email protected]
‫رﯾﻣﺎ اﻟﻧﺷﻣﻲ اﻟﻌﻧزي‬ 445008398 [email protected]

‫رﯾﻧﺎد اﻟﺳﺣﯾﺑﺎﻧﻲ‬ 445008374 [email protected]


Project overview :

Travelers from Riyadh to Jeddah may book flights using this system, which can
gather all user data and print a list of all available flights along with the timetable,
food options, and other details….

This system will gives you the freedom to arrange your trip RUH-JED so that you may get your agenda
there without worrying and have a full program planned.
Project class diagram
Service class:
An Interface class that serve the menu for the passenger such as Water , Tea, Coffee,
BeefSandwich ,and ChickenSandwich ,Also an abstract method that print every detail about the
classes

Booking class:
Abstract class that implements service interface class.

-its fields have the most important information of the system , such as flight time number , Name of
the flight , flight Confirmation number , gate number , Seat number , Seat letter, bags number ,
bags weight and passenger info.

It’s have full constructor, constructor call chaining (int FlightNumber, String NameOfTheFlight)type

Methods:

- getters + setters

- toString

- DisplayBookingDetails() that’s prints all of the booking details

- CalcBagsPrice() type double , its calculates the price by bugs weight

- abstract PrintClassName() type void , Force the classes that extends it to print them classes
name

Ticket class:
this class extends Booking abstract class , has a 'FlightTime' and 'FlightChecking' Composition
relationship

The attribute flightTime is to take the date and time of the flight

The attribute Availability is to check if there are available flights

It’s have constructor and constructor call chaining of type FlightTime and FlightChecking

-setters and getters

Methods:

-PrintBoarding() of type void that print the pass boarding

-toString()

-and its also print its class info


Passenger class :
This class extends booking,has no relationship ,has a full constructor

the attribte is to take passenger informations

Such as name of the passenger,email,phone Number and gender

We also have a method "DisplayPassengerInfo"that will print passenger's info

, a to String,"PrintClassName" method that will print the class name,and last a


"PRINTEVERYDETAIL" method that will print every detail in the class

FlightTime class:
This class is to take the flight time information

represented in date and time , also print all of the info of the class

FlightChecking class :
This class has no inheritance relationship from any superclass , either interface.

Its includes: two constructors , full constructor + Constructor(boolean AvailableTime, boolean


AvailableSeats)

- all setters and getters

-Methods:

-BookingVerify() with type boolean : its purpose is to confirm the flight booking

*toString method

*PrintClassName

- this method have no return type

- Its purpose to print name of class


Concepts covered :

Interface :

Inheritance :
Abstract classes:

Polymorphism :

Composition :
ArrayList (in the main) :
Array (with composition) :

exception handling :

Files :

Main Class :
The main class “Test” has one method , Fill( ArrayList<Passenger> list) and one main method
First when you run the program, welcom introduction will appear, then the program will ask the
user to enter his information

After that the menu will show and the program will ask the user to enter his choice

We have switch for all services in the menu

In switch , case 1, the program will show the available flight and will ask the user to select suitable
flight
Then, the program will ask the user to enter number of bags and calculate the price for each bag

After that, the program will show the available seatsand will ask the user to choose a seat

Then the program will ask the user if he wants food along with his booking

If the user pressed 1, the menu will appear

Depending on the user option the program will calculate the price
Then , the program will print the boarding pass

And thats all for case 1

In case 2, the program will ask the user to press 2 to cancle his booking, and thats all for case 2
In case 3, the program will show the Graphical user interface

If the user pressed on exit button, the program will exit the Graphical user interface

In case 4, the program will print the user information


In case 5 , the program will print Every detail

If the user chose case 6, the program will exit and print a goodbye letter

Then it will ask the user if he wants to look at the classes names

If the user chose 1

The program will print the classes names


In case 6 , data will be saved .

If there were Unknown information

The program will handle the problem and print “ unknown information “

If user entered wrong data type, The program will handle the problem and print “ invalid input“

Thats all for the main class ‘ Test ‘


Work distribution
‫راﻣﺎ‬ ‫ﻏدي‬ ‫رﯾﻣﺎ رﯾﻧﺎد‬

-Service class
Interface - - -
PRINTEVERYDETAIL ()

FlightChecking
Ticket class class

Passenger class Constructors , toString

final DisplayPassengerInfo() call chaining Mutator/Accessor - class passenger


Inheritance
FlightChecking{ setter and getter Constructor

Print_the_Flight_Ticket()} toString BookingVerify()

BookingVerify() PrintBoarding()

Booking class TicketCost class


Constructors Constructor
Call chaining DisplayTotalPrice()
Abstract classes Mutator/Accessor Booking{CalcBagsPrice()} - PrintFlightReceipt(
toString )

DisplayBookingDetails() Mutator/Accessor

abstract PrintClassName()

Instanceof

Polymorphism Casting - - -

PrintClassName()

Composition FlightTime class FlightTime class - -class passenger

ArrayList (in the ArrayList<Booking>MyList ArrayList<Booking> list ArrayList<Booking


main) add method ArrayList<Passenger> list > MyList
GUI: UI class (FileNotFoundException)
exception
- InputMismatchException (NoSuchElementException)
handling
NullPointerException (IllegalStateException)

ReadTextFile class

WriteTextFile class

openFile(String fileName)

-Files - - Write_File(Booking m) -

Close_File()

Read_File()

You might also like