0% found this document useful (0 votes)
14 views23 pages

Project File Class 12

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

Project File Class 12

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

HILLWOODS ACADEMY

2024-2025
PROJECT ON
AIRLINES MANAGEMENT SYSTEM

PROJECT SUBMITTED BY:


CLASS 12-A
PRANJAL NIVATIA
LAKSHYA VATS
CERTIFICATE

This to certify that the project / Dissertation


entitled AIRLINE MANAGEMENT SYSTEM is a
project done by PRANJAL NIVATIA and
LAKSHYA VATS of class XII-A ACADEMIC YEAR
2024-2025 in partial fulfilment of CBSE’s
AISSCE Examination 2025 and has been
carried out under my direct supervision and
guidance. This report or a similar report on
the topic has not been submitted for any
other examination and does not form a part
of any other course undergone by the
candidate.

1
ACKNOWLEDGEMENT

We would like to express our sincere gratitude


to Mrs. Ankita Sardana, our Computer
Science teacher, for her invaluable guidance,
continuous support, and insightful feedback
throughout the completion of this project.
We also appreciate the collaborative efforts of
everyone involved, which were essential to
the success of this project.
Thank you to everyone who supported us in
making this project a success.

2
TABLE OF CONTENTS
S.NO. TOPICS PAGE.NO.
1. INTRODUCTIO 4
N
2. OBJECTIVE OF 5
PROJECT
System 6
3. Implementation
Hardware used
Software used
Theoretical 7
4. Background
What is Database?
What is MySQL?
What is python?

5. CODE 8

6. OUTPUT 18

7. REFERENCES

3
INTRODUCTION

The Airline Management System is a


comprehensive software solution
designed to streamline and automate the
operations of an airline. This system aims
to simplify various tasks involved in
managing flight schedules, ticket bookings,
passenger details, and staff management.
With the increasing complexity and
demand in the airline industry, the need
for an efficient, error-free, and user-
friendly system has become essential.
Through this project, we aim to address
the common challenges faced by the
airline industry, providing a robust
solution that enhances the experience for
both airlines and passengers.

4
OBJECTIVE OF PROJECT
The primary objective of the Airline Management
System is to develop an automated, efficient, and user-
friendly software solution to manage and streamline
various operations of an airline. The key objectives
include:
1. Automating Flight Management: To create a
system for efficient management of flight
schedules, availability, and updates.
2. Simplifying Ticket Booking: To provide a seamless
platform for passengers to search for flights, book
tickets, and make payments online.
3. Efficient Reservation System: To allow easy
management of reservations, cancellations, and
passenger details by the airline staff.
4. Customer Management: To maintain and organize
customer profiles, including personal information,
booking history, and preferences.
5. User-Friendly Interface: To design an intuitive
interface for both passengers and airline staff,
ensuring ease of use and improved customer
experience.

5
System Implementation
HARDWARE USED:
1. Intel(R) Core (TM) i5-6500 CPU @
3.20GHz 3.19 GHz

2. 8.00 GB (7.68 GB usable)

SOFTWARE USED:
1. Windows 10
2. IDLE Python 3.12.6
3. MYSQL 8.0
4. Microsoft® Word (version 2019)

6
Theoretical Background
WHAT IS DATABASE?
DBMS is a software to store and maintain data in
the form of tables. We can easily create, modify,
delete and view data from database. Examples:
Ms-Access, MySQL, SQLite, Microsoft SQL Server,
Oracle etc.
WHAT IS MYSQL?
In order to access data within the Oracle
database, all programs and users must use,
Structured Query Language (SQL). SQL is the set of
commands that is recognised by nearly all
RDBMDs.
WHAT IS PYTHON?
Python is a high-level language. It is a free and
open-source language. It is an interpreted
language, as Python programs are executed
by an interpreter

7
CODE
import datetime

import mysql.connector as sql


from prettytable import PrettyTable
c=sql.connect(host='localhost',user='root',passwd='hillwoods',database='flight_management')
cr=c.cursor()
def flight():
while True:
fd=input("enter flight Name:")
fn=int(input("enter flight Id:"))
av=int(input('enter available seats:'))
so=input("enter Destination:")
ds=input("enter Source:")
tm=input("enter reaching time:")
p=int(input('enter the price of the flight:'))
dt=input("enter departure time:")
cr.execute("insert into flights values('{}',{},'{}','{}',{},'{}',
{},'{}')".format(fd,fn,so,ds,av,tm,p,dt))
o=input('enter more records??...(y/n):')
c.commit()
if o=='n':
break
This function updates the existing records
def upd():
cr.execute('select*from flights')
upd=PrettyTable()
upd.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
flights=PrettyTable()
flights.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
f=0
data=cr.fetchall()
for i in data:
flights.add_row(i)
print(flights)
while True:
p=int(input('what do you wish to update\n1.<No. of avaialable seats>\n2.<Price of the
FLight>\n3.<Departure time>\n4.<Exit>Enter your choice:'))
d=int(input('enter the Id of flight whose details are to be updated(Take reference
from above): '))
if p==1:
for j in data:
if j[1]==d:

8
f=1

else:
f=0
if f==1:
b=int(input('kindly enter the updated No. of available seats:'))
cr.execute('update flights set Avl_seats={} where
Flight_Id={}'.format(b,d))
c.commit()
cr.execute('select*from flights where Flight_Id={}'.format(d))
h=cr.fetchone()
upd.add_row(h)
print('here are the Updated details')
print(upd)
else:
print('Flight ID UnAvaialable')

elif p==2:
for j in data:
if j[1]==d:
f=1

else:
f=0
if f==1:
b=int(input('kindly enter the updated Price:'))
cr.execute('update flights set Price={} where Flight_Id={}'.format(b,d))
c.commit()
cr.execute('select*from flights where Flight_Id={}'.format(d))
h=cr.fetchone()
upd.add_row(h)
print('here are the Updated details')
print(upd)
else:
print('Flight ID UnAvaialable')
elif p==3:
for j in data:
if j[1]==d:
f=1

else:
f=0
if f==1:
b=input('kindly enter the updated Date and Time of Departure\nIn
format(yyyy-mm-dd hh:mm:ss):')
cr.execute('update flights set departure_time="{}" where
Flight_Id={}'.format(b,d))

9
c.commit()
cr.execute('select*from flights where Flight_Id={}'.format(d))
h=cr.fetchone()
upd.add_row(h)
print('here are the Updated details')
print(upd)
else:
print('Flight ID UnAvaialable')
g=input('wish to update more......(y/n)')
if g=='n':
break

def disp():
cr.execute('select*from flights')
global data
flights=PrettyTable()
flights.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
data=cr.fetchall()
for i in data:
flights.add_row(i)
print(flights)

def sarch():
cr.execute('select*from Flights')
fl=PrettyTable()
fl.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
f=0
lo=cr.fetchall()
while True:
print('How do you wish to search')
z=int(input('1.<Destination>\n2.<Price>\n3.<Date of Departure>("Work in Progress")\
n4.<Exit>\nEnter your choice:'))

if z==1:

while True:
k=input('Kindly enter the destination:')
for i in lo:
if i[2]==k:
f=1
break
else:

10
f=0
if f==1:
cr.execute("select*from flights where Destination='{}'".format(k))
b=cr.fetchone()
fl.add_row(b)
print(fl)
fl.del_row(0)

else:
print('Destination UnAvailable')
o=input('wish to search more using this option.......(y/n)')
if o=='n':
break

elif z==2:

while True:
y=int(input('Kindly enter the Lowest value for your price Range:'))
x=int(input('Kindly enter the highest value for your price Range:'))
f=0
for i in lo:
if i[6]>y and i[6]<x:
f=1
break
else:
f=0
if f==1:
cr.execute("select*from flights where Price between {} and
{}".format(y,x))
b=cr.fetchall()
for j in b:
fl.add_row(j)
print(fl)
fl.del_row(0)
else:
print('UnAvailable price range\nSorry :(')
v=input('wish to search more using this option.......(y/n)')
if v=='n':
break

elif z==3:

c=input('Kindly enter the Date of departure\nIn format(yyyy-mm-dd hh:mm:ss ):')


for i in lo:
a=str(i[7])
if a==c:
f=1
break

11
else:
f=0
if f==1:
cr.execute("select*from flights where departure_time='{}'".format(c))
b=cr.fetchall()
for v in b:
fl.add_row(v)
else:
print('Flight UnAvailable')
print(fl)

elif z==4:
break

l=input('wish to search more.......(y/n)')


if l=='n':
break

def reg():
reg=PrettyTable()

reg.field_names=['Destination','Flight_Name','Flight_Id','St_Point','Avl_seats','Arrival_Time
','Price','Departure_time','Name','P_Id','Phone_No','Gender','Age']
cr.execute('select*from flights natural join passangers')
z=cr.fetchall()
for i in z:
reg.add_row(i)
print(reg)

import datetime
import mysql.connector as sql
from prettytable import PrettyTable
c=sql.connect(host='localhost',user='root',passwd='hillwoods',database='flight_management')
cr=c.cursor()

#1 to check the avl flights


def disp():
cr.execute('select*from flights')
global data
flights=PrettyTable()
flights.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
data=cr.fetchall()
for i in data:

12
flights.add_row(i)
print(flights)

#2 to register
def insrt():
while True:
n=input('enter your name:')
i=int(input('enter your id:'))
a=int(input('enter your age:'))
g=input('enter your gender:')
global d
d=input('Where do you wish to fly to:')
p=input('enter your phone no.:')
f=0
cr.execute('select*from flights')
b=cr.fetchall()
for j in b:
if d==j[2]:
f=1
break
else:
f-0
if f==1:
cr.execute("insert into passangers values('{}',{},'{}','{}',
{},'{}')".format(n,i,p,g,a,d))
cr.execute("update flights set Avl_seats=Avl_seats-1 where
Destination='{}'".format(d))
passa=PrettyTable()

passa.field_names=['Destination','Flight_Name','Flight_Id','St_Point','Avl_seats','Arrival_Ti
me','Price','Departure_time','Name','P_Id','Phone_No','Gender','Age']
cr.execute('select*from flights natural join passangers where
passangers.Name="{}"'.format(n))
z=cr.fetchall()
for x in z:
print('Here are your flight details')
passa.add_row(x)
print(passa)
passa.del_row(0)
c.commit()
else:
print("Sorry:( but this flight isn't avaialable")
o=input('want to register more.....(yes/no)')
if o=='no':
print('>>>Your FLight Ticket has been succesfully booked<<<\nThank You for flying
with us:))')
break

13
#3 to cancel registration
def dele():
a=int(input('enter your Id:'))
cr.execute('select*from passangers')
f=0
lo=cr.fetchall()
for i in lo:
if i[1]==a:
f=1
break
else:
f=0
if f==1:
cr.execute("delete from passangers where P_Id={}".format(a))
c.commit()
print('Your flight tickets has been successfully canceled\nYour money will be soon
refunded\nThank you for contacting us :]')
else:
print('You are not registered!!')

#4 search the flight records


def sarch():
cr.execute('select*from Flights')
fl=PrettyTable()
fl.field_names=['Flight
Name','Flight_Id','Destination','St_point','avl_seats','Arrival_time','Price','Departure_time
']
f=0
lo=cr.fetchall()
while True:
print('How do you wish to search')
z=int(input('1.<Destination>\n2.<Price>\n3.<Date of Departure>("Work in Progress")\
n4.<Exit>\nEnter your choice:'))

if z==1:

while True:
k=input('Kindly enter the destination:')
for i in lo:
if i[2]==k:
f=1
break
else:
f=0
if f==1:
cr.execute("select*from flights where Destination='{}'".format(k))
b=cr.fetchone()
fl.add_row(b)

14
print(fl)
fl.del_row(0)

else:
print('Destination UnAvailable')
o=input('wish to search more using this option.......(y/n)')
if o=='n':
break

elif z==2:

while True:
y=int(input('Kindly enter the Lowest value for your price Range:'))
x=int(input('Kindly enter the highest value for your price Range:'))
f=0
for i in lo:
if i[6]>y and i[6]<x:
f=1
break
else:
f=0
if f==1:
cr.execute("select*from flights where Price between {} and
{}".format(y,x))
b=cr.fetchall()
for j in b:
fl.add_row(j)
print(fl)
fl.del_row(0)
else:
print('UnAvailable price range\nSorry :(')
v=input('wish to search more using this option.......(y/n)')
if v=='n':
break

elif z==3:

y=int(input('Kindly enter the lower value of Month of departure:'))


k=int(input('Kindly enter the lower value of Date of departure:'))

Y=int(input('Kindly enter the higher value Month of departure:'))


K=int(input('Kindly enter the higher value Date of departure:'))

m=datetime.datetime(2024,y,k)
M=datetime.datetime(2024,Y,K)

for i in lo:
if i[7]>m and i[7]<M:

15
f=1
break
else:
f=0
if f==1:
cr.execute("select*from flights where departure_time between '{}' and
'{}'".format(m,M))
b=cr.fetchall()
for v in b:
fl.add_row(v)
else:
print('Flight UnAvailable')
print(fl)

elif z==4:
break

l=input('wish to search more.......(y/n)')


if l=='n':
break

import datetime
import Admin
import user
while True:
print('welcome 0◡0\nHow Do you wish to enter')
a=int(input('1 : <Admin>\n2 : <User>\n3 : <Exit>\nEnter your choice:\n'))
if a==1:
ps=input('enter the Password:)')
if ps=='Gotham':
print('⁜===============================!Welcome Admin!
================================⁜')
print('=======================✧⪁Welcome To Gotham
Airlines⪄✧========================')
print('===============================✧Welcome
Admin✧================================')

print('================================================================================')
print(' »◔◡◔« ')
while True:
print('How do you wish to preceed:')
p=int(input('1 : <Add Flight Records>\n2 : <Display all Flight records>\
n3 : <Display all registrations>\n4 : <Search Flight Records>\n5 : <Update Flight Records>\
nEnter your choice:'))
print()
if p==1:
Admin.flight()
print()

16
elif p==2:
Admin.disp()
print()
elif p==3:
Admin.reg()
print()
elif p==4:
Admin.sarch()
print()
elif p==5:
Admin.upd()
print()
else:
print('Invalid Choice\n Please choose from above(i.e. from 1 to 5)')
print()
w=input('wish to continue.....(y/n)')
if w=='n':
break

else:
print('Wrong Password¬_¬\nYou are not the <Admin>')
print()
elif a==2:

print('⁜==============================================================================⁜')
print('=======================✧⪁Welcome To Gotham
Airlines⪄✧==========================')
print('==================(☞゚ヮ゚)☞✧Fly anywhere with Us✧☜(゚ヮ゚
☜)======================')

print('================================================================================')
print(' »◔◡◔« ')
while True:
print('How do you wish to preceed:')
k=int(input('1 : <Display all avaialable flights>\n2 : <Book a Flight Ticket>\
n3 : <Search the flight Records>\n4 : <Cancel Bookings>\n5 : <Exit>\nEnter your choice:'))
print()
if k==1:
user.disp()
print()
elif k==2:
user.insrt()
print()
elif k==3:
user.sarch()
print()
elif k==4:
user.dele()

17
print()
else:
print('Invalid Choice\n Please choose from above(i.e. from 1 to 4)')
print()
w=input('wish to continue.....(y/n)')
if w=='n':
break
elif a==3:
print('Thank you for flying with us OwO <3')
break

else:
print('Invalid Choice\nPlease choose from above(i.e. from 1 to 3)')

OUTPUT

18
19
20
21
REFERENCES
In order to work on this project titled-
AIRLINES MANAGEMENT SYSTEM, the
following books and sites are referred by us
during the various phases of development:

1. http://www.mysql.org/
2. http://www.python.org/
3. COMPUTER SCIENCE FOR CLASS XII
- by SUMITA ARORA

22

You might also like