Flight Booking System
Flight Booking System
Flight Booking System
1. INTRODUCTION
2
2. MANUAL SYSTEM 9
3. PROPOSED SYSTEM 10
6. DESIGN WORK
14
7. SYSTEM DEVELOPMENT
15
LIFE CYCLE[SDLC]
8. SOURCE CODE
21
9. OUTPUT(SCREENSHOT) 37
11. CONCLUSION 43
12. BIBLIOGRAPHY
44
INTRODUCTION TO PYTHON
Python is an interpreter, object-oriented, high-level programming language with
dynamic semantics. Its high-level built in data structures, combined with dynamic
typing and dynamic binding; make it very attractive for Rapid Application
Development, as well as for use as a scripting language to connect existing
components together. Python's simple and easy to learn syntax emphasizes
readability and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program modularity and code
reuse. The Python interpreter and the extensive standard library are available in
source or binary form without charge for all major platforms, and can be freely
distributed.
➢ Free and Open Source: Python is freely available. You can download it from the
Python Official Website. Secondly, it is open-source. This means that its source
code is available to the public. You can download it, change it, use it, and distribute
it.
➢ Extensible feature: If needed, you can write some of your Python code in other
languages like C++. This makes Python an extensible language, meaning that it can
be extended to other languages.
➢ Large Standard Library: Python has a large standard library which provides a
rich set of module and functions so you do not have to write your own code for
every single thing. There are many libraries present in python for such as regular
expressions, web browsers, etc.
All conventional methods are in more use instead of new technologies. And now as
everybody knows that computer graphs at its extent means the more you can use
computer system the more you can make your work easier.
And if in this case system is not computerized then it has to face a lot of problems
because every task gets complex and time consumable.
1. Costly
2. Difficulty in searching the records
3. Maintenance Problem
4. Time consuming
5. Tedious
PROPOSED SYSTEM
Proposed system is a system proposed which is computerized in every manner.
Computerized system is not just adding machines but they are capable of doing
much complex, tedious and cumbersome tasks.
Processing of data by hand is satisfactory only when the amount of data to be
processed is small and also the manual processing is slow, monotonous & often
subject to error.
Above explanation is clearly telling us that existing system contains a lot of
deficiencies which can be removed by only by following proposed system .
Now a days, computer graph is at its extent. Computerization contains a lot of
benefits so that everyone chasing and following computerized items. Now,
question arises what kind of help this project or computerized system can give
to remove all disadvantages of this existing system.
INTRODUCTION TO OUR PROJECT
Introduction to Flight Booking Systems
Flight Booking Systems play a pivotal role in modern travel, offering travelers a
convenient and efficient way to plan and manage their journeys by air. These systems
have revolutionized the way people book flights, making it easier and more accessible
than ever before.
1. Flight Search: Users can search for flights based on their departure and destination
cities, travel dates, and preferences. This allows travelers to explore various flight
options and find the most suitable ones.
2. Booking Flights: Once users have found their desired flights, they can proceed to
book their tickets. Flight Booking Systems facilitate the booking process, ensuring
travelers secure their seats with ease.
3. Seat Selection: Many systems offer the option to choose specific seats, allowing
passengers to customize their flying experience according to their preferences.
4. Pricing and Fare Information: Travelers can view detailed fare information,
including base fares, taxes, fees, and any additional charges. This transparency helps
passengers make informed decisions.
9. Comparison Shopping: These systems often provide features that allow users to
compare fares, routes, and airlines, helping them find the best deals and value for
their money.
10. Traveler Profiles: Some systems offer the option to create traveler profiles,
which can store personal information and travel preferences for quicker and more
efficient bookings in the future.
Flight Booking Systems have become an integral part of modern travel, simplifying
the process of planning and booking flights for millions of travelers worldwide.
Whether you're a frequent flyer or planning a one-time journey, these systems are
designed to make your travel experience more convenient and enjoyable.
MODULES USED IN PROJECT
1. mysqlconnector:
We can connect mysql and python using this module. Add record in mysql using this
module.
2. Random Module:
Python's random module provides functions for generating random numbers and
data, making it useful for tasks like simulations, games, and randomization.
3. Sys Module:
The sys module in Python provides access to system-specific parameters and
functions,
allowing you to interact with the Python runtime environment and command-line
arguments.
4. Tabulate Module:
Tabulate is a Python library that simplifies the creation of formatted tables from data
structures like lists and dictionaries, making it handy for data presentation and tabular
data manipulation.
DESIGN WORK – MIND MAP
Add Flight
Payment Processing
Ticket generation
User Authentication
Error handling
SYSTEM DEVELOPMENT CYCLE – SDLC
Every computer-based system has a life cycle. System development starts when
management or sometimes system development personnel feel that a new system or
an improvement in the existing system is required. The system development life cycle
is classically thought of as the
set of activities that analysis, designers and user carry to develop and implement an
information system.
One of the most difficult tasks to the system analyst is identifying the real problem of
the existing system. Without clear understanding of the problem in the system, any
further work done will lead to
wastage of effort at a later stage.
In Preliminary Survey the analyst get information about different source and find out
what are the objective of designing the proposed system i.e. what are requirement of
designing of the new software . In this we identified what are the problems in current
system to find out the drawback of current system and find out what are the best
system that full the requirement of the a particular Business Enterprises .
Feasibility Study
In this step we examine the feasibility of the proposed system. This involves the costs
and benefits of the system. Initially a rough cost benefit analysis will be sufficient for
the top management to take a decision either in favor of or against the proposed
system.
System design
When the system analyst decides that the requested system is feasible and the
management agrees to continue the development process, the next phase of SDLC is
determination of system requirements. This phase includes studying of existing
system in details and collecting data in order to find out the requirement of the users.
Implementation
Planning phase
The planning phase is the most critical step in completing development, acquisition,
and maintenance projects. Careful planning, particularly in the early stages of a
project, is necessary to coordinate activities and manage project risks effectively. The
depth and formality of project plans should be commensurate with the characteristics
and risks of a given project. Project plans refine the information gathered during the
initiation phase by further identifying the specific activities and resources required to
complete a project.
A critical part of a project manager’s job is to coordinate discussions between user,
audit, security, design, development, and network personnel to identify and
document as many functional, security, and network requirements as possible. During
this phase, a plan is developed that documents the approach to be used and includes
a discussion of methods, tools, tasks, resources, project schedules, and user input. A
Project Management Plan is created with components related to acquisition planning,
configuration management planning, quality assurance planning, concept of
operation.
3. Develop detailed data and process models (system inputs, outputs, and the
process.
4. Develop the test and evaluation requirements that will be used to determine
acceptables system performance.
Design phase
The design phase involves converting the informational, functional, and network
requirements identified during the initiation and planning phases into unified design
specifications that developers use to script programs during the development phase.
Program designs are constructed in various ways. Using a top-down approach,
designers first identify and link major program components and interfaces, then
expand design layouts as they identify and link smaller subsystems and connections.
Using a bottom-up approach, designers first identify and link minor program
components and interfaces, then expand design layouts as they identify and link larger
systems and connections. Contemporary design techniques often use prototyping
tools that build mock-up designs of items such as application screens, database
layouts, and system architectures . End users, designers, developers, database
managers, and network administrators should review and refine the prototyped
designs in an iterative process until they agree on an acceptable design. Audit,
security, and quality assurance personnel should be involved in the review and
approval process. During this phase, the system is designed to satisfy the functional
requirements identified in the previous phase.
Development phase
The development phase involves converting design specifications into executable
programs. Effective development standards include requirements that programmers
and other project participants discuss design specifications before programming
begins. The procedures help ensure programmers clearly understand program designs
and functional requirements. Programmers use various techniques to develop
computer programs. The large transaction-oriented programs associated with
financial institutions have traditionally been developed using procedural
programming techniques. Procedural programming involves the line-by-line
scripting of logical instructions that are combined to form a program. Effective
completion of the previous stages is a key factor in the success of the Development
phase. The Development phase consists of:
• Translating the detailed requirements and design into system
components.
• Testing individual elements (units) for usability.
• Preparing for integration and testing of the IT system.
• Testing as a deployed system with end users working together with contract
personnel
Implementation phase
This phase is initiated after the system has been tested and accepted by the user. In
this phase, the system is installed to support the intended business functions. System
performance is compared to performance objectives established during the planning
phase. Implementation includes user notification, user training, installation of
hardware, installation of software onto production computers, and integration of the
system into daily work processes. This phase continues until the system is operating
in production in accordance with the defined user requirements.
import random
import sys
mycursor = mycon.cursor()
def add_flight():
print("-------------------------------------------------------------------------------------------------------------------
--")
try:
mycursor.execute(query, values)
mycon.commit()
print("----------------------------------------------------------------------------------------------------------------
-----")
except:
print("----------------------------------------------------------------------------------------------------------------
-----")
print("----------------------------------------------------------------------------------------------------------------
-----")
if ans1.lower() == "y":
add_flight()
else:
start()
def login():
print("-------------------------------------------------------------------------------------------------------------------
--")
print()
n = int(input("CHOOSE FROM THE FOLLOWING OPTIONS (1 OR 2):"))
print("-------------------------------------------------------------------------------------------------------------------
--")
mycursor.execute(query)
if n == 1:
try:
mycursor.execute(query, values)
mycon.commit()
print("-------------------------------------------------------------------------------------------------------------
--------")
except:
print()
login()
elif n == 2:
mycursor.execute(query, values)
data = mycursor.fetchall()
nrec = mycursor.rowcount
if nrec != 0:
print()
print("LOGIN SUCCESSFUL...")
print("-------------------------------------------------------------------------------------------------------------
--------")
start()
else:
print()
print("LOGIN FAILED --> PLEASE ENTER THE CORRECT EMAIL AND PASSWORD")
login()
# Function to start the main menu
def start():
print()
if n == 1:
search_flights()
elif n == 2:
book_flight()
elif n == 3:
add_flight()
elif n == 4:
sys.exit()
else:
def search_flights():
print("-------------------------------------------------------------------------------------------------------------------
--")
print()
values = (a, b)
mycursor.execute(query, values)
data = mycursor.fetchall()
nrec = mycursor.rowcount
list1 = []
if nrec != 0:
for i in data:
list1.append(i)
print("----------------------------------------------------------------------------------------------------------------
-----")
else:
print()
print()
print("----------------------------------------------------------------------------------------------------------------
-----")
start()
print("-------------------------------------------------------------------------------------------------------------------
--")
print()
values = (a, b)
mycursor.execute(query, values)
data = mycursor.fetchall()
nrec = mycursor.rowcount
list1 = []
if nrec != 0:
for i in data:
list1.append(i)
else:
return
print()
print("PLEASE PROVIDE US THE FOLLOWING DETAILS OF THE FLIGHT YOU WANT TO BOOK")
values = (fno,)
mycursor.execute(query, values)
data = mycursor.fetchone()
list3 = []
list3.append(data)
print()
ans2 = input("ARE YOU SURE YOU WANT TO BOOK THIS FLIGHT? (Y/N):")
print()
if ans2.lower() == "y":
mycursor.execute(query)
mycursor.execute(query)
np = int(input("NUMBER OF PASSENGERS:"))
print()
passengerno = i
s1 = random.randint(1, 30)
s2 = random.randint(0, 5)
query = "INSERT INTO passengers VALUES (%s, %s, %s, %s, %s)"
mycursor.execute(query, values)
mycon.commit()
print()
values = (fno,)
mycursor.execute(query, values)
data = mycursor.fetchone()
tfare = np * data[0]
print("----------------------------------------------------------------------------------------------------------
----------")
print("----------------------------------------------------------------------------------------------------------
----------")
print()
print()
if ans3.lower() == "y":
print()
print()
if n == 1:
elif n == 2:
print()
elif n == 3:
print()
print("-------------------------------------------------------------------------------------------------------
-------------")
print()
n = int(input("CHOOSE FROM THE FOLLOWING OPTIONS (1, 2 OR 3):"))
print()
if n == 1:
print("************************************************************************
******** *************************************")
print("FLIGHT DETAILS")
values = (fno,)
mycursor.execute(query, values)
data = mycursor.fetchone()
list4 = []
list4.append(data)
print("PASSENGERS DETAILS")
mycursor.execute(query)
data = mycursor.fetchall()
nrec = mycursor.rowcount
list5 = []
if nrec != 0:
for i in data:
list5.append(i)
hr = random.randint(1, 23)
if hr < 12:
else:
print("************************************************************************
******** *************************************")
print("----------------------------------------------------------------------------------------------------
----------------")
elif n == 2:
print("----------------------------------------------------------------------------------------------------
----------------")
mycursor.execute(query)
print("YOUR BOOKING HAS BEEN CANCELED...")
print("----------------------------------------------------------------------------------------------------
----------------")
start()
elif n == 3:
print("----------------------------------------------------------------------------------------------------
----------------")
print("----------------------------------------------------------------------------------------------------
----------------")
start()
else:
print("-------------------------------------------------------------------------------------------------------
-------------")
start()
else:
start()
else:
start()
else:
start()
if __name__ == "__main__":
login()
start()
OUTPUT SCREENSHOT
Table created in MySQL
SYSTEM TESTING AND MAINTENANCE
Testing can be defined as the project of executing the project in a controlled
manner. In order to answer the question “Does the project behave as specified”.
It also is the only way of finding out whether or not there are any errors in a
system. Therefore testing is an important part of SDLC.
Like all other stages of SDLC, testing needs time and proper resources to become a
meaningful activity. Testing is vital to the success of the system. Testing makes a
logical assumption that if all parts of the system are correct, the goal will be
successfully achieved.
TYPES OF TESTING
Unit testing:- Each component or part of the program is tested individually to
verify that the detailed design for the unit has been correctly implemented.
Module testing:- In large system, a module may be a group of several programs or
functions or sub-module testing.
Integration testing:- It is carried out to find problems in the interface between
resembled unit modules in a system.
System testing:- It is executing a program to check logic changes made in it
and with the intention of finding errors.
MAINTENANCE:
After the implementation, the systems need to be maintained in order to adapt
the changing business and user needs. Different techniques are used to properly
maintain a system like:
1. Correction – correction means to find out the error of the existing system and
then correct them.
2. Adaptation – Adaptation means changes are done in existing software
according the requirement of the new environment.
CONCLUSION
To conclude the software presents the user with a system that satisfies all the
objective of the organization. The system developed presents the user with the
major benefits of user- friendliness, security, and hardware independence. Its data
is also used to generate the reports that are needed by the client of this system.
BIBLIOGRAPHY
https://www.w3schools.com/python/module_random.asp
https://pypi.org/project/tabulate/
https://python.mykvs.in/presentation/presentation2021/class%20xii/