Information related Airline Management system with Binary Search Tree(BST)
Information about Management system
Introduction:
This project is about the airline
management system and now I will make a simple introduction to this project
which is that what is an airline management system to talk about this firstly I
will tell that what is management system so management system is something like
a program which manage the record of the company or organization. It helps to
calculate, manage, or make record the data by different operations. So, I will
make a management system of airline tickets that if a customer reserve a ticket
than the data of this customer will store inside the program and in this way we
can make a record and this record can help us to check that which customer
reserve the ticket from our organization or company and this can save a lot of
the time of us. And the main point is the whole project is based on the binary
search tree (BST) because is algorithm faster than most of the algorithms. And
how this algorithm works and the answer is while storing the information this
algorithm stores the information by in this manner than if the number is
smaller than the previous number than it will store at the left of that number
and if the number will greater than the number will save at the right of that
number.
So this was the simple introduction
for our management system.
Scope of this Airline Management system:
Scope of the airline management
system is that, this can help the customer to check the availability of the
flight where a customer can reserve the ticket, cancel the ticket, modify the
ticket or check the ticket. So, this is the scope for the airline management
system.
Functionality:
This management system will hold the
complete record of the customer who will reserve or cancel the ticket. So, the
functionality of this airline management system is following:
Reserve the Ticket:
In this function one may
reserve the ticket. This is totally beneficial for the company because it will
save your lot of the time and how this function will work I will tell you so
when a user reserve the ticket than information will store in such a way that
if the last number will greater than the previous number than information will
store at the right of the binary tree and if the number will less than the last
number than information will store at the left of the tree.
Cancel the ticket:
In
this function if the user reserved the ticket than by using this function he
can cancel the ticket. So, how this function will work and the answer is this
for example if the ticket numbers are these 5 4 6 7 and user want to cancel the
4 number ticket than this function will transverse at the first node than
compare that number with the expected number and this number is not equal to
that number so this function will transverse at the left of the tree and now it
will compare the 4 number with that number and now number is equal to that
expected and now this function will delete that complete node and how it will
heal the remaining nodes which can be attach to that node which is deleted so
the answer is this, if the expected number will 5 which we want to delete than
we will find that number and transverse the root to that node than find the
greatest number at the left of the tree after finding that number we will swap
the data of both the nodes than we will delete the founded node.
So, this function is
little bit tricky and in this way this function works.
Show the whole tickets:
In this function we will show the complete information which is stored
inside the tree. In this function there are three ways to show the tickets
In-order Transversal:
In this transversal we will show the data
of the left node than show the data of root node and show the data of the right
node.
Pre-order transversal:
In this transversal, function will show the
data of the root node first than show the data of the left node than right
node.
Post-order transversal:
In this transversal, function
will show the data of the left node than right node than root node.
Search the Ticket:
In this function we will find
the expected ticket to check data about that ticket so the functionality of
this function about the same as the delete ticket function but in this function
we will not delete the data but at the place of delete we will check the data
about that ticket.
Modify the tickets:
So
in function we will modify the data of expected ticket. So how this functions
works and the answer is this first we will find the node or ticket number of
expected node then we will modify the data of that ticket.
Print ticket:
In this function we can print the ticket of
the expected passenger and how this will works first of all we will find the
ticket number of the passenger and make a ticket of that person this function is
something like the search function but the major difference in this function is
in search function we were show the data of that person but in this function we
will make a ticket of the that person and user can also print out the ticket of
that person.
So, in this way this
function works.
Classes:
I will make 3 classes 1
will reserve for a stack and 1 will reserve for a Airline and 1 will reserve
for passengers and the names of the classes will be stack, airline and
passenger also there will be association
between two classes named as airline and passenger. And functionalities of the
management system is defined above.
Comments
Post a Comment