[go: up one dir, main page]

0% found this document useful (0 votes)
422 views25 pages

Air Ticket ReservatioN

The document is a project report on developing an air ticket reservation system. It includes sections describing the objectives, software and hardware requirements, advantages, and limitations of the project. Python code is provided to implement functions for customer registration, viewing flight classes and menu options, calculating ticket prices, ordering food items, and generating luggage bills. The code includes functions for connecting to a MySQL database containing tables for passenger data, class types, food menu, and luggage rates.

Uploaded by

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

Air Ticket ReservatioN

The document is a project report on developing an air ticket reservation system. It includes sections describing the objectives, software and hardware requirements, advantages, and limitations of the project. Python code is provided to implement functions for customer registration, viewing flight classes and menu options, calculating ticket prices, ordering food items, and generating luggage bills. The code includes functions for connecting to a MySQL database containing tables for passenger data, class types, food menu, and luggage rates.

Uploaded by

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

PROJECT ON :

Air ticket
reservation

Submitted by : ABC
Class : Roll no. : 12345678
School :ABC XYZ SCHOOL
CERTIFICATE

CLASS: XII YEAR: 2021-2022

This is to certify that Investigatory Project is successfully


completed by ABC XYZ of Class: , Division: ,
Roll no.: for the academic year 2021-2022 in the School
Computer lab.

External Examiner Internal Examiner


(Subject Teacher)

Date: / / 20 Department of: COMPUTER SCI.


Acknowledgement :

I, ABC XYZ of class , Roll no. - 12345678 would like to

express our sincere gratitude to our computer

science teacher Mr. TEACHER'S NAME , PGT

COMPUTER SCIENCE, for his/her vital support,

guidance and encouragement – without which this

project would not have come forth .

I would also like to express our gratitude to our school

XYZ PUBLIC SCHOOL for letting us use the school

laboratory .
INDEX

1. Brief Overview of Project

2. Need for Computerization

3. Software and Hardware requirement

4. Advantages of Project

5. Limitations of Project

6. Source Code of Project

7. Output Screens

8. Future Enhancement of Project

9. Bibliography
AIR TICKET RESERVATION
BRIEF OVERVIEW OF PROJECT
The main objective of the python project on Air ticket
reservation is to manage the details of booking,
payments, seats, and flights.
The project is totally built at administrative end and
only administrator is guaranteed the access.
The purpose of the project is to build an application
program to reduce the manual work for managing the
booking, discounts, seats, and payments.
It tracks all the details about seats, flight, and
payments; it also prints various reports as per input
given by the user.
INPUT DATA AND VALIDATION OF PROJECT

1. All the fields such as flight payments discounts


are validated and does not take invalid values.
2. Each form of sales, discounts, bookings cannot
accept the blank values.
3. Avoiding errors in data.
4. Controlling amount of input.

1
SOFTWARE AND HARDWARE
REQUIREMENTS :
Data file handling has been effectively
used in the program. The database is a
collection of interrelated data to serve
multiple applications. That is database
programs create files of information. So
we see that files are worked with most,
inside the program.
DBMS: The software required for the management of
data is called as DBMS. It has3 models:
• Relation model
• Hierarchical model
• Network model
RELATIONAL MODEL: It’s based on the concept on
relation. Relation is the table that consists of rows and
columns. The rows of the table are called tuple and the
columns of the table are called attribute. Numbers of
rows in the table is called as cardinality. Number of
columns in the table is called as degree.

2
HIERARCHICAL MODEL:In this type of model, we
have multiple records for each record. A particular
record has one parent record. No chide record can
exist without parent record. In this, the records are
organized in tree.
NETWORK MODEL: In this, the data is represented by
collection of records and relationship is represented
by (ink or association.
CHARACTERISTICS OF DBMS:
• It reduces the redundancy
• Reduction of data in inconsistency
• Data sharing
• Data standardization
DIFFERENT TYPES OF FILES: -BASED ON ACCESS:
• Sequential file

• Serial file
• Random (direct access) file BASED ON STORAGE:-
• Text file
• Binary File

3
NEED OF COMPUTERISATION
Over the decades computers and air ticket
bookings have developed gradually, changed with
time. But nobody knew that a time will come when
both these fields will complement each other so well.
Today air ticket booking has reached new heights by
computer aided methods of design. As a result of
which, computer industry has got its new customer.
Computer technology is making waves in the flight
booking zone. Computers are a vital component of the
ticket booking counters. Computer aided design (CAD)
programs reduce the demand for manual sketches.
New software programs continue to replace old
manual skills. Those who lag in math can now breathe
a little easier.Manually figuring of tickets insists that
knowledge. Software programs constantly evolve. A
program used today may be obsolete within several
years. Being trained on today's software does not
guarantee it will be used when you are ready to go out
into the field. Understanding calculations is timeless,
as is computer competency. Software, however, shifts
rapidly.

4
ADVANTAGES

1. It generates the report on sales, discounts and flights.


2. Provides filter report on payments and flight booking.
3. We can easily export PDF on sales, products and stocks.
4. Applications can also provide excel export for bookings
and discounts.
5. It deals with monitoring the information and
transaction of ticket bookings.
6. It increases the efficiency of flight booking and discount.
7. It has higher efficiency of editing, adding and updating
of records.
8. Provides the searching facilities on various factors.

LIMITS
1. Excel export has not been developed for bookings.
2. The transactions are executed in offline mode only.
3. Online transactions for sales, bookings, or other data
modifications are not possible.
4. Offline reports of sales, bookings, and discounts cannot
be generated due to batch mode execution.

5
Source codescreening
DBMS: MySQL
Host: local host
User: root
Pass: 12345
Database: hotel
Table Structure: (Images Bellow)

6
PYTHON CODE :
import os

import platform

import mysql.connector

import datetime

mydb = mysql.connector.connect(user='root', password='12345',

host='localhost',

database='air')

mycursor=mydb.cursor()

def registercust():

L=[]

name=input("enter name:")

L.append(name)

addr=input("enter address:")

L.append(addr)

jr_date=input("enter date of journey:")

L.append(jr_date)

source=input("enter source:")

7
L.append(source)

destination=input("enter destination:")

L.append(destination)

cust=(L)

sql="insert into
pdata(custname,addr,jrdate,source,destination)values(%s,%s,%s,%s,%s)
"

mycursor.execute(sql,cust)

mydb.commit()

def classtypeview():

print("Do you want to see class type available : Enter 1 for yes :")

ch=int(input("enter your choice:"))

ifch==1:

sql="select * from classtype"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

def ticketprice():

print ("We have the following rooms for you:-")

8
print ("1. type First class---->rs 6000 PN\-")

print ("2. type Business class---->rs 4000 PN\-")

print ("3. type Economy class---->rs 2000 PN\-")

x=int(input("Enter Your Choice Please->"))

n=int(input("No of passenger:"))

if(x==1):

print ("you have opted First class")

s=6000*n

elif (x==2):

print ("you have opted Business class")

s=4000*n

elif (x==3):

print ("you have opted Economy class")

s=2000*n

else:

print ("please choose a class type")

print ("your room rent is =",s,"\n")

def menuview():

print("Do yoy want to see menu available : Enter 1 for yes :")

ch=int(input("enter your choice:"))

9
ifch==1:

sql="select * from food"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

def orderitem():

global s

print("Do yoy want to see menu available : Enter 1 for yes :")

ch=int(input("enter your choice:"))

ifch==1:

sql="select * from food"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

print("do you want to purchase from above list:enter your choice:")

d = int(input("enter your choice:"))

10
if(d==1):

print("you have ordered tea")

a=int(input("enter quantity"))

s=10*a

print("your amount for tea is :",s,"\n")

elif (d==2):

print("you have ordered coffee")

a=int(input("enter quantity"))

s=10*a

print("your amount for coffee is :",s,"\n")

elif(d==3):

print("you have ordered colddrink")

a=int(input("enter quantity"))

s=20*a

print("your amount for colddrink is :",s,"\n")

elif(d==4):

print("you have ordered samosa")

a=int(input("enter quantity"))

s=10*a

print("your amount fopr samosa is :",s,"\n")

11
elif(d==5):

print("you have ordered sandwich")

a=int(input("enter quantity"))

s=50*a

print("your amount for sandwich is :",s,"\n")

elif(d==6):

print("you have ordered dhokla")

a=int(input("enter quantity"))

s=30*a

print("your amount for dhokla is :",s,"\n")

elif(d==7):

print("you have ordered kachori")

a=int(input("enter quantity"))

s=10*a

print("your amount for kachori is :",s,"\n")

elif(d==8):

print("you have ordered milk")

a=int(input("enter quantity"))

s=20*a

print("your amount for kachori is :",s,"\n")

12
elif(d==9):

print("you have ordered noodles")

a=int(input("enter quantity"))

s=50*a

print("your amount for noodles is :",s,"\n")

elif(d==10):

print("you have ordered pasta")

a=int(input("enter quantity"))

s=50*a

print("your amount for pasta is :",s,"\n")

else:

Print("please enter your choice from the menu")

def lugagebill():

global z

print("Do yoy want to see rate for lugage : Enter 1 for yes :")

ch = int(input("enter your choice:"))

ifch == 1:

sql="select * from lugage"

mycursor.execute(sql)

rows = mycursor.fetchall()

13
for x in rows:

print(x)

y = int(input("Enter Your weight of extra lugage->"))

z = y*1000

print("your laundarybill:",z,"\n")

return z

def lb():

print(z)

def res():

print(s)

def ticketamount():

a = input("enter customer name:")

print("customer name :",a,"\n")

print("lugage bill:")

print(lb)

print("food bill:")

print(“total amount”)

def Menuset():

print(“AIR TICKET RESERVATION”)

14
print("enter 1: To enter customer data")

print("enter 2 : To view class")

print("enter 3 : for ticketamount")

print("enter 4 : for viewing food menu")

print("enter 5 : for food bill")

print("enter 6 :for lugage bill")

print("enter 7 : for complete amount")

print("enter 8 : for exit")

'''try:

#userinput = int(input("pleaseselect an above option:"))

except ValueError:

exit("\n hi thats not a number")'''

userinput = int(input("enter your choice"))

if(userinput==1):

registercust()

elif(userinput==2):

classtypeview()

elif(userinput== 3):

ticketprice()

15
elif(userinput==4):

menuview()

elif(userinput==5):

orderitem()

elif(userinput==6):

lugagebill()

elif(userinput==7):

ticketamount()

elif(userinput==8):

quit()

else:

print("enter correct choice")

Menuset()

def runagain():

runagn=input("\n want to run again y/n:")

while(runagn.lower()=='y'):

if(platform.system()=="windows"):

print(os.system('cls'))

else:

print(os.system('clear'))

16
Menuset()

runagn = input("\n want to run again y/n:")

runagain()

OUTPUT SCREEN :
Finally, we conclude our work and present the output of the Project .

TO ENTER CUSTOMER DETAILS :

17
TO VIEW CLASS :

TO VIEW TICKET AMOUNT :

18
TO EXIT THE PROGRAM :

19
Future enhancements :

1. The solutions are given as a proposal. The suggestion


is revised on user request and optimal changes are
made. This loop terminates as soon as the user is
gratified with the proposal.

2. So on the whole, system analysis is done to improve


the system performance by monitoring it and
obtaining the best throughput possible from it.
Therefore system analysis plays a crucial role in
designing any system.

3. This is basically an interface of global distribute


system to carry out reservation on desired airline
from any place.

4. Airline reservation system make the life of


passengers very easy as they don’t need to stand in
queues for getting their seats reserved.

5. They can easily make reservation of any airline just


from a single system. On the other hand, it also
remove an extra burden from the Airline
Department as most of the passengers and travel
agencies use this service instead of making
reservations from the counters.
20
BIBLIOGRAPHY :

1. http://www.google.com/
2. http://en.wikipedia.org
3. Computer science with python
by Sumita Arora
4. LearnPython.org

21

You might also like