0% found this document useful (0 votes)
64 views

CS Project Vaishakh

This document contains code for an air ticket reservation system in Python. It includes functions for registering customers, viewing class types and menus, calculating ticket prices based on class, and ordering food items from the menu. The code interacts with a MySQL database to store customer data, class types, menus, and process orders. Key functions allow registering customers, viewing options, calculating prices, and ordering from the menu while tracking totals.

Uploaded by

vaishakhvg9
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)
64 views

CS Project Vaishakh

This document contains code for an air ticket reservation system in Python. It includes functions for registering customers, viewing class types and menus, calculating ticket prices based on class, and ordering food items from the menu. The code interacts with a MySQL database to store customer data, class types, menus, and process orders. Key functions allow registering customers, viewing options, calculating prices, and ordering from the menu while tracking totals.

Uploaded by

vaishakhvg9
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/ 21

JAWAHAR NAVODAYA

VIDYALAYA KASARAGOD

ACADEMIC YEAR: 2022-2023

AIR TICKET RESERVATION

REG NO :

NAME : NIBHIN T K

CLASS : XII A

SUBJECT : COMPUTER SCIENCE

SUBJECT CODE : 083

GUIDED BY : Mrs DEVIKRISHNA KS

PGT IT

JAWAHAR NAVODAYA VIDYALAYA


KASARAGOD
PROJECT ON

AIR TICKET RESERVATION


CERTIFICATE

This is to certify that NIBHIN TK of class XII A of Jawahar Navodaya


Vidyalaya Kasaragod has done his project on AIR TICKET BOOKING
under my supervision. He has taken interest and has shown at most
sincerity in completion of this project.
I certify this Project up to my expectation & as per guidelines issued by
CBSE, NEW DELHI.

Date :

Internal Examiner External Examiner

Principal
ACKNOWLEDGEMENT

Apart from the efforts of me, the success of any project depends largely
on the encouragement and guidelines of many others. I take this
opportunity to express my gratitude to the people who have been
instrumental in the successful completion of this project.

I express deep sense of gratitude to almighty of God for giving me


strength for the successful completion of the project.

I express my deep sense of gratitude to K M Vijayakrishnan The


Principal of Jawahar Navodaya Vidyalaya Kasaragod who has been
continuously motivating and extending his helping hand to us.

I express my sincere thanks to The Vice Principal, for constant


encouragement and the guidance provided during this project

My sincere thanks to Mrs Devikrishna, In-charge, a guide who critically


reviewed my project and helped in solving each and every problem,
occurred during implementation of the project.
INDEX

SNO DESCRIPTION
1 BRIEF OVERVIEW
SOFTWARE AND HARDWARE
2 REQUIREMENTS

3 NEED OF
COMPUTERISATION

4 ADVANTAGES AND
LIMITATIONS

5 PYTHON CODE

6 OUTPUT SCREENS

7 SOURCE CODE SCREENS

8 FUTURE ENHANCEMENT OF
THE 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.
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.

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
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.
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.
PYTHON CODE

import os
import platform
import pandas
import datetime
import mysql.connector
print("***** VAN AIRLINES *****")
mydb=mysql.connector.connect(user='root',password='12345',host='loca
lhost',database='Airlines')
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:")
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)"
cursor=mydb.cursor()
cursor.execute(sql,cust)
mydb.commit()
def classtypeview():
print("Do you want to see class type available: enter 1 for yes:")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from classtype"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
def ticketprice():
print("We have following rooms for you:-")
print("1.First class--->Rs 6000 PN\-")
print("2.Bussiness class--->Rs 4000 PN\-")
print("3.Economy class--->Rs 2000 PN\-")
x=int(input("Enter your choice please->"))
n=int(input("No of passengers:"))
if x==1:
print("you have opted First class")
v=6000*n
elif x==2:
print("you have opted Business class")
v=4000*n
elif x==3:
print("you have opted Economy class")
v=2000*n
else:
print("Please choose a class type")
print("Your room rent is =",v)
def menuview():
print("Do you want to see menu available:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from food"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
def orderitem():
print("Do you want to see menu available:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from food GROUP BY SNO"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
print("Do you want to purchase from above list:enter your choice")
d=int(input("Enter the choice:"))
global s
if d==1:
print("You have ordered Tea")
a=int(input("Enter the quantity:"))
s=120*a
print("your amount for tea is:",s)
elif d==2:
print("You have ordered MILK")
a=int(input("Enter the quantity:"))
s=100*a
print("your amount for MILK is:",s)
elif d==3:
print("You have ordered DOSA & CURRY")
a=int(input("Enter the quantity:"))
s=200*a
print("your amount for DOSA & CURRY is:",s)
elif d==4:
print("You have ordered Puttu&Kadala ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Puttu&Kadala is:",s)
elif d==5:
print("You have ordered MEAL")
a=int(input("Enter the quantity:"))
s=350*a
print("your amount for MEAL is:",s)
elif d==6:
print("You have ordered Pazhampori ")
a=int(input("Enter the quantity:"))
s=50*a
print("your amount for Pazhampori is:",s)
elif d==7:
print("You have ordered UPMA ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for UPMA is:",s)
elif d==8:
print("You have ordered Zinger burger ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Zinger burger is:",s)
elif d==9:
print("You have ordered Tika Wrap ")
a=int(input("Enter the quantity:"))
s=200*a
print("your amount for Tika Wrap is:",s)
elif d==10:
print("You have ordered Mojito ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Mojito is:",s)
else:
print("Please enter your choice from menu")

def luggagebill():
global z
print("Do you want to see rate for luggage:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
mycursor = mydb.cursor()
mycursor.execute("SELECT * FROM luggage")
myresult = mycursor.fetchall()
for x in myresult:
print(x)
y=int(input("Enter your weight of extra luggage->"))
z=y*1000
print("Your luggage bill:",z)
return z

def lb():
global z
print(z)

def food():
global s
print(s)

def ticketamount():
a=input("Enter customer name:")
print("customer name:",a)
print("luggage bill:")
lb()
print("food bill:")
food()
print("total amount",s+z)

def menuset():
print("AIR TICKET RESEVATION")
print("enter 1:to enter customer data")
print("enter 2:to view class")
print("enter 3:for ticket amount")
print("enter 4:for viewing food menu")
print("enter 5:for food bill")
print("enter 6:for luggage bill")
print("enter 7:for complete amount")
print("enter 8:for exit")

userinput=int(input("Please select an above option:"))


if (userinput==1):
registercust()
elif (userinput==2):
classtypeview()
elif (userinput==3):
ticketprice()
elif (userinput==4):
menuview()
elif (userinput==5):
orderitem()
elif (userinput==6):
luggagebill()
elif (userinput==7):
ticketamount()
elif (userinput==8):
print('QUITTING....')
else:
print("Enter correct choice")

menuset()
def runagain():
runagn=input("Do you wish to continue? y/n")
while(runagn.lower()=='y'):
menuset()
runagain()
OUTPUT SCREENS
SOURCE CODE SCREENING
DBMS:MYSQL
HOST:LOCAL HOST
USER:ROOT
PASSWORD:12345
DATABSE:AIRLINES

TABLE STRUCTURE:
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.

BIBLIOGRAPHY

• https://www.unicef.org/education
• https://www.google.com/
• https://en.wikipedia.org/
• https://www.geeksforgeeks.org/
• https://www.pexels.com/
• computer science with python class 12 sumita arora

You might also like