Airport Management
Airport Management
1.INRODUCTION
2.SYSTEM ANALYSIS
3. SYSTEM DESIGN
3.1 CLASS
3.2 OBJECTS
3.3 FILES
4. SOURCE CODE
5. OUTPUT SCREENS
6.CONCLUSION
7.BIBLIOGRAPHY
INTRODUCTION
ABOUT THE ORGANISATION
This Project entitled
SOFTWARE
Platform: Microsoft Windows 10
Language: Python
HARDWARE
Processor: Pentium gold G5 400 CPU @ 3.70 GHZ
RAM: 4GB
PYTHON
PROGRAM FILE
>AIRPORT MANAGEMENT SYSTEM.PY
BILL FILE
>BILLING.PY
MYSQL
DATABASE
>AIR
of the passengers.
Manual system takes a lot of space to store the record of customers details.
SYSTEM DESIGN
AIRPLANE DETAILS
pno: integer variable that stores airplane number
aname: character that store airplane name.
route: character that stores initial and final destination
time: integer variable that stores departure and arrival time
arbno: integer variable that stores aerobridge of arrival
dd: character that stores date
PASSENGER DETAILS
pco: integer variable that stores passenger’s code.
pname: character variable that stores passengers’s name
mob: integer variable that stores mobile number
price: integer variable that stores price
tno: integer variable that stores total no of passengers
adr: character that stores passenger’s address
pno: integer variable that stores airplane’s number
BILL
Billno of type Integer
aname of type character.
pname of type character
total of type integer
SOURCE CODE
def insertdatadoc():
cnx=mysql.connector.connect(user="root",password
="rani",host="localhost",database="air")
cursor=cnx.cursor()
pno=int(input("Enter airplane number:"))
aname=input("Enter airplane name:")
route=input("Enter initial-final
destination:")
time=input("'Enter departure-arrival time:")
arbno=int(input("Enter aerobridge of
arrival:"))
dd=input("Enter date:")
cursor.execute('insert into airport
values(%s,"%s","%s","%s",%s,"%s")'%
(pno,aname,route,time,arbno,dd))
cnx.commit()
cursor.close()
cnx.close()
print("Record inserted.......")
def displaydoc():
#os.system('cls')
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
query=("select*from airport")
cursor.execute(query)
for(pno,aname,route,time,arbno,dd)in cursor:
print("=========================================
===============================")
print("Airplane number:",pno)
print("Airplane name:",aname)
print("Initial-Final
destination:",route)
print("Departure-Arrival:",time)
print("Aerobridge of arrival:",arbno)
print("Date:",dd)
print("=========================================
===============================")
cnx.commit()
cursor.close()
cnx.close()
print("YOU HAVE DONE IT!!!!!!!")
def deletebookdoc():
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
pno=input("Enter airplane number to be
deleted from the airport")
qry=("delete from airport where pno=%s")
del_rec=(pno,)
cursor.execute(qry,del_rec)
cnx.commit()
cursor.close()
cnx.close()
print(cursor.rowcount,"record(s) deleted
successfully.....")
def searchbookrecdoc():
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
pno=input("Enter airplane number to be
searched from airport:")
query=("select*from airport where pno=%s")
rec_srch=(pno,)
cursor.execute(query,rec_srch)
rec_count=0
for(pno,aname,route,time,arbno,dd)in cursor:
rec_count+=0
print("=========================================
===============================")
print("Airplane number:",pno)
print("Airplane name:",aname)
print("Fnitial-Final
destination:",route)
print("Departure-Arrival:",time)
print("Aerobridge of arrival:",arbno)
print("Date:",dd)
print("=========================================
===============================")
if rec_count%2==0:
input("press any key to continue")
clscreen()
print(rec_count,"Record(s) found")
cursor.close()
cnx.close()
def updatebookdoc():
cnx=mysql.connector.connect(user='root',password
='rani',host='localhost',database='air')
cursor=cnx.cursor()
pno=int(input("Enter airplane number to be
updated from airport:"))
print("Enter new data")
aname=input("Enter airplane name:")
route=input("Enter initial-final
destination:")
time=input("Enter departure-arrival time:")
arbno=int(input("Enteraerobridge of
arrival:"))
dd=input("Enter date:")
qry=('update airport set aname=%s,route=
%s,time=%s,arbno=%s,dd=%s where pno=%s')
data=(aname,route,time,arbno,dd,pno)
cursor.execute(qry,data)
cnx.commit()
cursor.close()
cnx.close()
print(cursor.rowcount,"Record(s) updated
succesfully......")
def menubookdoc():
while(True):
print("\t\t\t airplane management\n")
print("=========================================
===============================")
print("1.Add Airplane record")
print("2.Display Airplane record")
print("3.Search Airplane record")
print("4.Delete Airplane record")
print("5.Update Airplane record")
print("6.Return Airplane record")
print("=========================================
===============================")
choice=int(input("enter your choice between
1 to 6----->:"))
if choice==1:
insertdatadoc()
elif choice==2:
displaydoc()
elif choice==3:
searchbookrecdoc()
elif choice==4:
deletebookdoc()
elif choice==5:
updatebookdoc()
elif choice==6:
return
else:
print("wrong choice.... enter your
choice again")
x=input("enter y to continue:")
def insertpassengers():
cnx=mysql.connector.connect(user="root",password
="rani",host="localhost",database="air")
cursor=cnx.cursor()
pco=int(input("enter passenger code:"))
pname=input("enter passenger name:")
mob=int(input("enter passenger mobile no:"))
adr=input("enter passenger address:")
price=int(input("enter price:"))
tno=int(input("enter total no of
passengers:"))
pno=int(input("enter airplane no:"))
cursor.execute('insert into passengers
values(%s,"%s",%s,"%s",%s,%s,%s)'%
(pco,pname,mob,adr,price,tno,pno))
cnx.commit()
cursor.close()
cnx.close()
print("record inserted.......")
def displaypassengers():
#os.system('cls')
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
query=("select*from passengers")
cursor.execute(query)
for(pco,pname,mob,adr,price,tno)in cursor:
print("=========================================
===============================")
print("passenger code:",pco)
print("passenger name:",pname)
print("mobile no. of passengers:",mob)
print("address:",adr)
print("price:",price)
print("total no of passenger:",tno)
print("=========================================
===============================")
cursor.close()
cnx.close()
print("YOU HAVE DONE IT!!!!!!!")
def searchpassengers():
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
pco=input("enter passenger code to be
searched from passengers:")
query=("select*from passengers where pco=
%s")
rec_srch=(pco,)
cursor.execute(query,rec_srch)
rec_count=0
for(pco,pname,mob,adr,price,tno)in cursor:
rec_count+=0
print("=========================================
===============================")
print("passenger code:",pco)
print("passenger name:",pname)
print("mobile number:",mob)
print("address:",adr)
print("price:",price)
print("total no of passengers:",tno)
print("=========================================
===============================")
if rec_count%2==0:
input("press any key to continue")
clscreen()
print(rec_count,"record(s) found")
cursor.close()
cnx.close()
def deletepassengers():
cnx=mysql.connector.connect(user='root',host='lo
calhost',passwd='rani',database='air')
cursor=cnx.cursor()
pco=input("Enter passenger code to be
deleted from the passenger")
qry=("delete from passengers where pco=%s")
del_rec=(pco,)
cursor.execute(qry,del_rec)
cnx.commit()
cursor.close()
cnx.close()
print(cursor.rowcount,"record(s) deleted
successfully.....")
def updatepassengers():
cnx=mysql.connector.connect(user='root',password
='rani123',host='localhost',database='air')
cursor=cnx.cursor()
pco=int(input("enter passenger number to be
updated:"))
print("enter new data")
pname=input("enter passenger name:")
mob=input("enter mobile number:")
adr=input("enter address of the passenger:")
price=int(input("enter price:"))
tno=input("enter total no of passengers:")
qry=('update passengers set pname=%s,mob=
%s,adr=%s,price=%s,tno=%s where pco=%s')
data=(pname,mob,adr,price,tno,pco)
cursor.execute(qry,data)
cnx.commit()
cursor.close()
cnx.close()
print(cursor.rowcount,"records updated
succesfully......")
def menupassengers():
while(True):
print("\t\t\t passengers record
management\n")
print("=========================================
===============================")
print("1.Add passenger record")
print("2.Display passenger record")
print("3.Search passenger record")
print("4.Delete passenger record")
print("5.Update passenger record")
print("6.Return to main menu")
print("=========================================
===============================")
choice=int(input("enter your choice
between 1 to 6----->:"))
if choice==1:
insertpassengers()
elif choice==2:
displaypassengers()
elif choice==3:
searchpassengers()
elif choice==4:
deletepassengers()
elif choice==5:
updatepassengers()
elif choice==6:
return
else:
print("wrong choice.... enter your
choice again")
x=input("enter y to continue")
def Menu():
cnx=mysql.connector.connect(host='localhost',use
r='root',passwd='rani',database='air')
cursor=cnx.cursor()
while(True):
print("\t\t\t Airport Management System\n")
print("========================")
print("1.Airplane Management record")
print("2.Passenger Management record")
print("3.Bill Management record")
print("4.return to main menu")
print("========================")
choice=int(input("enter choice between 1 to
4 ------>:"))
if choice==1:
menubookdoc()
elif choice==2:
menupassengers()
elif choice==3:
billmenu()
elif choice==4:
exit()
else:
print("wrong choice.....enter your
choice again")
x=input("enter any key to continue")
def billmenu():
while(True):
print("1.bill updation,2.display billings")
choice=int(input("entert a choice 1-2"))
if choice==1:
bill()
elif choice==2:
display()
else:
print("wrong choice")
exit()
x=input("enter any key to continue")
def display():
cnx=mysql.connector.connect(host='localhost',use
r='root',passwd='rani',database='air')
cursor=cnx.cursor()
hno=input("enter airplane no to be
searched:")
query=("select*from bill where billno=%s")
rec_srch=(hno,)
cursor.execute(query,rec_srch)
for(billno,aname,pname,total)in cursor:
print("=========================================
=================================")
print("bill number:",billno)
print("Airplane name:",aname)
print("Passenger name:",pname)
print("total amount:",total)
print("=========================================
=================================")
cursor.close()
cnx.close()
def bill():
cnx=mysql.connector.connect(host='localhost',use
r='root',passwd='rani',database='air')
cursor=cnx.cursor()
query= ("select
airport.pno,aname,pname,price,tno from
airport,passengers where
passengers.pno=airport.pno")
cursor.execute(query)
for(pno,aname,pname,price,tno)in cursor:
print(pno,aname,pname,price,tno)
t=price*tno
cursor.execute('insert into
bill(aname,pname,total)values("%s","%s",%s)'%
(aname,pname,t))
cnx.commit()
cursor.close()
cnx.close()
bill()
Menu()
CONCLUSION
This Project “AIRPORT MANAGEMENT
SYSTWEM” Provides an efficient method for the
proper management of the records. The whole
software is menu driven and hence user friendly.
This project has storage facilities that allow the
storage of the passenger details.
USER FRIENDLY:
This project is menu driven and hence very
friendly.It displays the required messages
whenever and necessary.
RELIABILITY:
Software reliability concerns with how well the
function to meet the requirements of the user.
BIBLIOGRAPHY