0% found this document useful (0 votes)
5 views41 pages

CS-Project 123

This document details a project developed by a student that focuses on creating an online portal for airport staff and customers to manage flight bookings and tracking. It includes acknowledgments, objectives, theoretical background on Python and related technologies, system implementation details, and source code examples. The project aims to enhance user experience and streamline operations at the airport through a functional web application.

Uploaded by

wjhv56mfkt
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)
5 views41 pages

CS-Project 123

This document details a project developed by a student that focuses on creating an online portal for airport staff and customers to manage flight bookings and tracking. It includes acknowledgments, objectives, theoretical background on Python and related technologies, system implementation details, and source code examples. The project aims to enhance user experience and streamline operations at the airport through a functional web application.

Uploaded by

wjhv56mfkt
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/ 41

Prepared by : Umed harwani

Class : 12 C
ACKNOWLEDGEMENT

It is my humble pleasure to acknowledge my deep sense of gratitude to my


Computer Science teacher, Mrs. Anuja Nair for her constant help and
guidance at each and every stage.

I take this opportunity to express my gratitude and respect to all those who
helped in the completion of this project and to my school for providing me
with this opportunity.
CONTENTS
S.N Topic Pg
o no.
1 INTRODUCTION 1

2 OBJECTIVE AND SCOPE OF THE 2


PROJECT
3 THEORETICAL BACKGROUND OF 3
THE
PROJECT
4 SYSTEM IMPLEMENTATION 6

5 SYSTEM DESIGN AND 8


DEVELOPMENT
6 SOURCE CODE 11

7 RESULTS AND DISCUSSION 21

8 CONCLUSION AND FUTURESCOPE 25

9 BIBLIOGRAPHY 26
INTRODUCTION
This project developed by my team provides a insight on the various
process that staff has to perform at an airport via their portal and how a
customer is able to book and track via the same portal.
OBJECTIVE AND SCOPE OF THE PROJECT

To provide a portal which can provide various functionalities(booking a


flight , tracking a flight etc) to the customer and the staff .
THEORETICAL BACKGROUND OF THE
PROJECT
 Python

Python is an interpreted, 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 or glue language to connect existing components together.
Python’s simple, 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. Often, programmers fall in love with Python because of
the increased productivity it provides. Since there is no compilation step,
the edit-test-debug cycle is incredibly fast. Debugging Python programs is
easy: a bug or bad input will never cause a segmentation fault.
 Spyder IDE

Spyder is an open source cross-platform integrated development


environment (IDE) for scientific programming in the Python language.
Spyder integrates with a number of prominent packages in the scientific
Python stack, including NumPy, Matplotlib, Pandas as well as other open
source software. It is released under the MIT license.
Initially created and developed by Pierre Raybaut in 2009, since 2012
Spyder has been maintained and continuously improved by a team of
scientific Python developers and the community.
Spyder is extensible with first and third party plugins includes support for
interactive tools for data inspection and embeds Python-specific code
quality assurance and introspection instruments, It is available cross-
platform through Anaconda, on Windows, on macOS and on major Linux
distributions such as Gentoo Linux open SUSU and Ubuntu.
Spyder uses Qt for its GUI, and is designed to use either of the PyQt or
PySide Python bindings. PyQt a thin abstraction layer developed by the
Spyder project and later adopted by multiple other packages, provides the
flexibility to use either backend.
 MySQL

MySQL is an open-source relational database management


system (RDBMS). Its name is a combination of "My", the name of co-
founder Michael Widenius's daughter My, and "SQL", the acronym
for Structured Query Language.
MySQL is free and open-source software under the terms of the GNU
General Public License, and is also available under a variety
of proprietary licenses.
A relational database organizes data into one or more data tables in
which data may be related to each other; these relations help structure
the data. SQL is a language that programmers use to create, modify and
extract data from the relational database, as well as control user access
to the database. In addition to relational databases and SQL, an RDBMS
like MySQL works with an operating system to implement a relational
database in a computer's storage system, manages users, allows for
network access and facilitates testing database integrity and creation of
backups.
SYSTEM IMPLEMENTATION

1. Hardware specifications:

HP-Laptop

Manufacturer: HP
Model: HP Pavillion Laptop 15-cx0xxx
Processor : Intel® Core™ i7-8300H CPU @ 2.3GHz
Installed Memory: 8192MB
System Type: Windows 11 Home 64-Bit
2. Software specifications:
 Windows 11 Home

Copyright © Microsoft 2021. All rights reserved.

 MySQL(8.0):

 Spyder(Python 3.7)

 Word(2016)

SYSTEM DESIGN AND DEVELOPMENT


mysql. connector- The “mysql.connector” module helps connect Python
with MySQL. In this program we have used:
1. Fetchall(): cur.fetchall() fetches all the rows of a query result. It
returns all the rows as a list of tuples.

2. Con.cursor= Cursor stores all the data as a temporary container of


returned data and we can fetch data one row at a time from Cursor.

3. Cur.execute= this method execute the given database operation. The


parameters found in the tuple or dictionary params are bound to the
variables in the operation.

4. Con.commit= it sends a commit statement to the mysql server,


committing the current transaction.

5. Con.close(): this method closes the cursor, resets all results, and
ensures that the object has no reference to its original connection
object.
MYSQL TABLES USED IN THIS PROJECT:
SOURCE CODE:
print('WELCOME TO DELHI AIRPORT ONLINE PORTAL')
import mysql.connector as ms
con=ms.connect(host='localhost',user='umed',passwd='1234',database='airport')
cur=con.cursor()
a=int(input('''
1 staff
2 customer
3 staff and airline details
select your choice(1/2) :'''))
if a==2:
b=int(input('''what do you want to do:
1 do a booking
2 track flight status
enter your choice: '''))
if b==1:
import mysql.connector as ms

con=ms.connect(host='localhost',user='umed',passwd='1234',database='airport')
cur=con.cursor()
b=input('enter your departure date')
c=input('departure airport')
d=input('enter arrival airport')
cur.execute('select * from flight_schedule as f,flightdate as t where
f.flight=t.flight and date like"%s"'%b)
data=cur.fetchall()
for i in data:
if i[1]==c:
if i[2]==d:
print('these are the available flight:')
print('flight: ',i[0])
print('departure: ',i[1])
print('arrival: ',i[2])
print('departure time: ',i[8])
print('arrival time: ',i[9])
print('flight id: ',i[10])
if i[4]!=0:
print('economy is available')
if i[5]!=0:
print('premium economy available')
if i[6]!=0:
print('bussiness available')
if i[7]!=0:
print('first available')
g=input('do you want to continue your booking(yes/no):')
if g=='yes':
h=int(input('enter your preffered flights flight id :'))
class2=int(input('''enter your prefered class:
1 economy
2 premium economy
3 bussiness
4 first'''))
if class2==1:
if i[4]==0:
print('flight doesnot have this seat')
elif i[4]!=0:
print('this is your final price after service charge=',i[4])
pay=input('do you want to continue to payment ')
if pay=='yes':
method=input('enter your prefered payment method
(card/cash)')
if method=='cash':
print('please vist the neasrest delhi airport office to pay
for yout flight within 48hours or the booking will be cancelled')
elif method=='card':
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail')
print('thank you for your booking you will recive
the ticket in the mail')
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
else:
print('thankyou for visiting')
elif class2==2:
if i[5]==0:
print('flight doesnot have this seat')
elif i[5]!=0:
print('this is your final price after service charge=',i[5])
pay=input('do you want to continue to payment ')
if pay=='yes':
method=input('enter your prefered payment method
(card/cash)')
if method=='cash':
print('please vist the neasrest delhi airport office to pay for
yout flight within 48hours or the booking will be cancelled')
elif method=='card':
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail')
print('thankyou for your booking you will recive the
ticket in the mail')
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
else:
print('thankyou for visiting')
elif class2==3:
if i[6]==0:
print('flight doesnot have this seat')
elif i[6]!=0:
print('this is your final price after service charge=',i[6])
pay=input('do you want to continue to payment ')
if pay=='yes':
method=input('enter your prefered payment method
(card/cash)')
if method=='cash':
print('please vist the neasrest delhi airport office to pay for
yout flight within 48hours or the booking will be cancelled')
elif method=='card':
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail')
print('thankyou for your booking you will recive the
ticket in the mail')
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
else:
print('thankyou for visiting')
elif class2==4:
if i[7]==0:
print('flight doesnot have this seat')
elif i[7]!=0:
print('this is your final price after service charge=',i[7])
pay=input('do you want to continue to payment ')
if pay=='yes':
method=input('enter your prefered payment method
(card/cash)')
if method=='cash':
print('please vist the neasrest delhi airport office to pay for
yout flight within 48hours or the booking will be cancelled')
elif method=='card':
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail')
print('thankyou for your booking you will recive the
ticket in the mail')
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
else:
print('thankyou for visiting')

elif b==2:
n=int(input('enter your flight slno :'))
cur.execute('select * from flight_schedule as f,flightdate as t where
f.flight=t.flight')
data=cur.fetchmany()
for i in data:
if i[3]==n:
print('flight',i[0])
print('departure airport:',i[1])
print('arrival airport',i[2])
print('slno:',i[3])
print('deprture time',i[8])
print('landing time',i[9])
print('flightid:',i[10])
print('flight date',i[12])
o=input('is this your flight yes/no')
if o=='yes':
print('thanks for using our service')
break
else:
print('flight not found')
break
if a==1:
while True:
p=int(input('''
enter your number with respect to your position in the staff :
1 ground staff (pssenger check in )
2 security staff (security check)
3 boarding(ground staff/cabin crew)
'''))
if p==1:
r=int(input('enter passenger id:'))
status=''
cur.execute('select*from passenger where passengerid=%s'%(r))
data=cur.fetchone()
name=data[7]
flightid=data[2]
passengerid=data[1]
if len(data)==0:
print('passenger details not found ')
elif len(data)!=0:
print('passenger details found ')
print('bookingid: ',data[0])
print('passengerid: ',data[1])
print('flight id: ',data[2])
print('seat number: ',data[3])
print('class: ',data[4])
print('booking date: ',data[5])
print('payment method: ',data[6])
print('name: ',data[7])
s=int(input('enter luggage weight:'))
if s<=30:
status='checked in '
print(status)
elif s>30:
print('weight is more than 30kg')
print('to carry this weight you need to pay extra')
print('your extra weight=',s-30)
payextra=input('do you want to pay extra')
if payextra=='yes':
extraweight=s-30
extrapayment=extraweight*40
print('you have to pay=',extrapayment)
input2=input('how would you like to pay (cash/card)')
if input2=='cash':
print('please vist the neasrest customer service to pay for your
excess weight ')
elif input2=='card':
while True:
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail')
print('thankyou payment recived you may proceed')
break
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
elif payextra=='no':
print('please decrease your total weight')
elif p==2:
name2=input('enter passenger name: ')
cur.execute('select*from passenger where name="%s"'%(name2))
char=cur.fetchall()
pid=int(input('enter passenger id'))
for i in char:
if i[1]==pid:
print('imigration done ')
print('procede to security check')
carry_on_weight=int(input('enter the weight of carry on bag:'))
if carry_on_weight<=10:
print('security check completed ')
print('procede to the boarding gate')
elif carry_on_weight>10:
print('decrease your total weight or payextra')
print('your extra weight=',carry_on_weight-10)
payextra2=input('do you want to pay extra')
if payextra2=='yes':
extraweight2=carry_on_weight-10
extrapayment=extraweight*20
print('you have to pay=',extrapayment)
input2=input('how would you like to pay (cash/card):')
if input2=='cash':
print('please vist the neasrest customer service to pay for your
excess weight ')
elif input2=='card':
while True:
cardno=input('enter your card no:')
if len(cardno)==16:
cvv=int(input('enter cvv:'))
exp=int(input('enter card exp date year(yyyy):'))
if exp>=2025:
mail=input('enter your mail:')
print('thank you for your your payment is scuccesfull you
may proceed to boarding')
break
else:
print('you card is not valid for payment')
else:
print('your card no is invalid please enter again')
elif payextra2=='no':
print('please decrease your total weight')
elif p==3:
z=input('enter passenger name: ')
cur.execute('select*from passenger where name="%s"'%(z))
char=cur.fetchall()
pid=int(input('enter passenger id'))
for i in char:
if i[1]==pid:
print('boarding done ')
break
else:
print('passenger not found ')
break
break
if a==3:
chimp=int(input('''
1 staff details
2 mark attendence
3 airline details
who's details would you like to check : '''))
if chimp==1:
staff=cur.execute('select*from staff_details')
run=cur.fetchmany()
for i in run:
check=int(input('enter staff code:'))
if check==i[1]:
print('staff found')
print(i)
else:
print('staff not present . would you like to add new staff(yes/no)')
rule=input('enter your choice')
if rule=='yes':
name_new=input('enter name')
code_new=input('enter code as per position')
position_new=input('enter position')
cur.execute('select*from staff')
box=cur.fetchall()
print(box)
for i in box:
if code_new==i[0]:
print(i[0])
cur.execute('insert into staff_details values("%s",
%s)'%name_new,code_new)
con.commit()
cur.execute('insert into staff
values(%s,"%s")'%code_new,position_new)
con.commit()
print('new staff added')
else:
print('invalid code re-enter')
break
elif rule=='no':
break
elif chimp==2:
staff=cur.execute('select*from staff_details')
run2=cur.fetchmany()
id_code=int(input('enter your code'))
id_name=input('enter name')
for i in run2:
if i[0]==id_name and i[1]==id_code:
print('WELCOME attendence marked ')
else:
print('staff not found ')
elif chimp==3:
print('do you need details of specific flight companies')
done=input('enter your choice')
if done=='yes':
flightcode=int(input('enter company code'))
cur.execute('select* from flight')
flight=cur.fetchall()
found=0
for i in flight:
if flightcode==i[1]:
found=2
un=i[0]
cur.execute('select * from flight_schedule ')
company=cur.fetchall()
print('company:',i[0])
print('company code:',i[1])
companysch=input('do you want to see company flight schedule')
if companysch=='yes':
for i in company:
if i[0]==un:
print('company:',i[0],'departure:',i[1],'arival:',i[2],'slno:',i[3],'take off
time:',i[8],'landing time:',i[9],'flight id:',i[10])
print('departure:',i[1])
print('arival:',i[2])
print('slno:',i[3])
print('take off time:',i[8])
print('landing time:',i[9])
print('flight id:',i[10])
if found==0:
print('company details not found' )

RESULTS AND DISCUSSION

1. Tasks that a staff member has to perform

WELCOME TO DELHI AIRPORT ONLINE PORTAL

1 staff
2 customer
3 staff and airline details
select your choice(1/2) :1
enter your number with respect to your position in the staff :
1 ground staff (pssenger check in )
2 security staff (security check)
3 boarding(ground staff/cabin crew)
1
enter passenger id:700
passenger details found
bookingid: 100
passengerid: 700
flight id: 737
seat number: 23
class: economy
booking date: 2024-05-12
payment method: credit card
name: rahul
enter luggage weight:35
weight is more than 30kg
to carry this weight you need to pay extra
your extra weight= 5
do you want to pay extra:yes
you have to pay= 200
how would you like to pay (cash/card):card
enter your card no:2345678902345678
enter cvv:234
enter card exp date year(yyyy):2029
enter your mail: umed.h@gmail.com
thankyou payment recived you may proceed
1 staff
2 customer
3 staff and airline details
select your choice(1/2) :1

enter your number with respect to your position in the staff :


1 ground staff (pssenger check in )
2 security staff (security check)
3 boarding(ground staff/cabin crew)
2
enter passenger name: rahul
enter passenger id700
imigration done
procede to security check
enter the weight of carry on bag:9
security check completed
procede to the boarding gate

enter your number with respect to your position in the staff :


1 ground staff (pssenger check in )
2 security staff (security check)
3 boarding(ground staff/cabin crew)
3
enter passenger name: rahul
enter passenger id700
boarding done

2. If passenger has to book his flight:


WELCOME TO DELHI AIRPORT ONLINE PORTAL

1 staff
2 customer
3 staff and airline details
select your choice(1/2) :2
what do you want to do:
1 do a booking
2 track flight status
enter your choice: 1
enter your departure date2024-05-20
departure airportdelhi
enter arrival airportsharjha
these are the available flight:
flight: air arabia
departure: delhi
arrival: sharjha
departure time: 22:53:34
arrival time: 2:52:25
flight id: 747
economy is available
do you want to continue your booking(yes/no):yes
enter your preffered flights flight id :747
enter your prefered class:
1 economy
2 premium economy
3 bussiness
4 first1
this is your final price after service charge= 16500
do you want to continue to payment yes
enter your prefered payment method (card/cash)card
enter your card no:2345678902345678
enter cvv234
enter card exp date year(yyyy):2028
enter your mailumed.h@gmail.com
thank you for your booking you will recive the ticket in the mail
3. If a customer has to track his flight:
WELCOME TO DELHI AIRPORT ONLINE PORTAL

1 staff
2 customer
3 staff and airline details
select your choice(1/2) :2
what do you want to do:
1 do a booking
2 track flight status
enter your choice: 2
enter your flight slno :7
flight: air arabia
departure airport: delhi
arrival airport: sharjha
slno: 7
deprture time : 22:53:34
landing time : 2:52:25
flightid: 747
flight date: 2024-05-20
is this your flight yes/no:yes
thanks for using our service
4. If the administrator has to verify staff data
WELCOME TO DELHI AIRPORT ONLINE PORTAL

1 staff
2 customer
3 staff and airline details
select your choice(1/2) :3

1 staff details
2 mark attendence
3 airline details
who's details would you like to check : 1
enter staff code:234764
staff found
('pushkal', 234764)

5. If the administrator has to verify airline data


WELCOME TO DELHI AIRPORT ONLINE PORTAL
1 staff
2 customer
3 staff and airline details
select your choice(1/2) :3
1 staff details
2 mark attendence
3 airline details
who's details would you like to check : 3
do you need details of specific flight companies
enter your choice:yes
enter company code:102
company: air india
company code: 102
do you want to see company flight schedule:yes
company: air india departure: dubai arival: delhi slno: 1 take off time:
22:50:20 landing time: 1:50:20 flight id: 737
departure: dubai
arival: delhi
slno: 1
take off time: 22:50:20
landing time: 1:50:20
flight id: 737
6. The staff to mark attendance:
WELCOME TO DELHI AIRPORT ONLINE PORTAL

1 staff
2 customer
3 staff and airline details
select your choice(1/2) :3
1 staff details
2 mark attendence
3 airline details
who's details would you like to check : 2
enter your code234764
enter namepushkal
WELCOME attendence marked
CONCLUSION AND FUTURESCOPE:

After successfully completing my project on AIRPORT MANAGEMENT,


I have verified that I have met all the objectives for the project.
The procedure followed in the project is very simple, advantageous. The
code has been put to several tests and has confirmed that there are no
drawbacks or technical errors.
I had put to use all the help that was given to me by my friends and my
teacher, and I am deeply grateful to them.
It could be improved further by making the GUI more user friendly, as
well as allowing the customer to use other forms of payment as well.

THANK YOU
BIBLIOGRAPHY:
 www.python.org
 www.wikipedia.org
 www.google.com
 https://dev.mysql.com/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy