Cs

You might also like

You are on page 1of 28

COMPUTER SCIENCE

KENDRIYA VIDYALAYA NO.2 VASCO


DA GAMA,GOA
JAN 2020

AIRLINE TICKET RESERVATION

CBSE, All India Senior Secondary Certificate Exam


2020

Submitted to Kendriya Vidyalaya No.2 Vasco


Da Gama,GOA in Partial Fulfillment of the
Requirements for CBSE, All India Senior
Secondary Certificate Exam 2020.

By:
UTAKARSH SINGH
(CBSE Roll No: )
&
TANVI PARSEKAR
(CBSE Roll No: )

Guide
Naveen Kumar Ghavari
CERTIFICATE

This is to certify that the project entitled, “AIRLINE TICKET


RESERVATION”, which is being submitted herewith for the
award of CBSE , AISSCE, 2020, is the result of the work
completed by Utkarsh Singh under my supervision and
guidance within the four walls of the institute and the same has
not been submitted elsewhere for the award of any degree.

(Naveen Kumar Ghavari)


Internal Examiner
Guide

(Kishor Kumar) External Examiner


Principal
UNDERTAKING

I declare that the work presented in this project titled


“Airline Ticket Reservation”, submitted to the KV
No.2 Vasco Da Gama, for the award of the CBSE,
AISSCE, 2020 , is my original work. I have not
plagiarized or submitted the same work for the award
of any other degree. In case this undertaking is found
incorrect, I accept that my degree may be
unconditionally withdrawn.
Acknowledgement
I would like to express my special thanks of gratitude to my
teacher Mr. Naveen Kumar Ghavari as well as our principal
Mr. Kishor Kumar who gave me the golden opportunity to do
this wonderful project on the topic (Airline Ticket Reservation),
which also helped me in doing a lot of Research and i came to
know about so many new things I am really thankful to them.
Secondly i would also like to thank my parents and friends
who helped me a lot in finalizing this project within the limited
time frame.

Contents:
1. About Software
2. Use Case Diagram
3. SQL Table Used
4. Topic Covered in theory
5. Coding
6. Screen Shot
7. Limitation
Introduction:

Airline reservation System is a computerized system used to store and


retrieve information and conduct transactions related to air travel. The
project is aimed at exposing the relevance and importance of Airline
Reservation Systems.

Use Case Diagrams


It is projected towards enhancing the relationship between customers
and airline agencies through the use of ARSs, and thereby making it
convenient for the customers to book the flights as when they require
such that they can utilize this software to make reservations.

An airline reservation system (ARS) is part of the so-called passenger


service systems (PSS), which are applications supporting the direct
contact with the passenger. ARS eventually evolved into the computer
reservations system (CRS). A computer reservation system is used for
the reservations of a particular airline and interfaces with a global
distribution system (GDS) which supports travel agencies and other
distribution channels in making reservations for most major airlines in a
single system.
Today all persons are busy with their schedule and no one have time
to make a trip for holidays with their family. And this Airline Reservation
Process is very difficult to understand in General meaning. But we are
providing a Solution for that Problem. This system provides a facility to
easy access towards a customers and a real time users. They can
easily connected through it and just 3 steps. There is no requirement
for any type of Agent. We are giving a all this facility in one project
“Airline Reservation System”.

This software has two parts. First is user part and the administrator
part. User part is used as a front end and administrator is the back end.
Administrator is used by airline authority. It will allow the customers to
access database and allow new customers to sign up for online access.
The system allows the airline passenger to search for flights that are
available between the two travel cities, namely the “Departure city” and
“Arrival city” for a particular departure and arrival dates. The system
displays all the flight’s details such as flight no, name, price and
duration of journey etc. After search the system display list of available
flights and allows customer to choose a particular flight
Then the system checks for the availability of seats on the flight. If the
seats are available then the system allows the passenger to book a
seat. Otherwise it asks the user to choose another flight. To book a
flight the system asks the customer to enter his details such as name,
address, city, state, and credit card number and contact number. Then
it checks the validity of card and book the flight and update the airline
database and user database. The system also allows the customer to
cancel his/her reservation, if any problem occurs. The main purpose of
this software is to reduce the manual errors involved in the airline
reservation process and make it convenient for the customers to book
the flights as when they require such that they can utilize this software
to make reservations, modify reservations or cancel a particular
reservation.
FEATURES :
 Free Account
 Full detailed Flights
 Easy to Get Flights
 Easy to edit and view your Personal Information
 User Friendly
 Secure
FUTURE PLANNING AND SCOPE :
We are trying to give a live reporting which is updated by Airline
Companies so that customer gets a live Flights checking, Available
seats, Pricing and also planning to provide seats as per theirs choice
so that they can travel very comfortably their journey. We will trying to
provide food facility and choice to customers so that they can feel like
their home and more effective amenities. We are also trying to make
more attention on Business class people and their requirements. Our
future planning is to take this project towards an AndroidApp and QR
Code Scanning. So that a Customer can easily contact to the Airlines
and they are getting quick Services from Airlines.
Topic Covered:
MySql : SQL is an acronym of Structured Query Language. It is a
standard language developed and used for accessing and modifying
relational databases.

Queries used

Create Database : To create a new database


Create database air;

Create Table :1) create table pdata(custname


varchar(20),addr varchar (30),jrdate varchar(10),source
varchar(10),destination varchar(10));
2) create table classtype (sno varchar(5),classtype varchar(10),price
integer(10));
3) create table food(sno integer(10),itemname varchar(10),rate
integer(10));
4) create table lugage(sno integer(10),weight varchar(10),rate
integer(10));

Add Values : insert into classtype values ('1','Firstclass',6000);


insert into classtype values ('2','Busiclass',4000);
insert into classtype values ('3','Ecoclass',2000);
insert into food values(1,"tea",10);
insert into food values(2,"coffee",10);
insert into food values(3,"colddrink",20);
insert int0 food values(4,"samosa",10);
insert into food values(5,"sandwich",50);
insert into food values(6,"Dhokla",30);
insert into food values(7,"kachori",10);
insert into food values(8,"milk",20);
insert into food values(9,"noodles",50);
insert into food values(10,"pasta",50);
insert into lugage values(1,"20kg",1000);
insert into lugage values(2,"25kg",1500);
insert into lugage values(3,"30kg",2000);
insert into lugage values(4,"50kg",3000);

Delete Values : To delete values existing in the table


delete from pdata where Name =””;

Update Values : To edit or update the existing values in the


table
Update Name set Nick_name “…….” where Name = ………….;
Search Values : To search the values in table if already
inserted
Select * from pdata where Name =Tanvi parsekar;
MySql datatypes:

Numeric

 INT
int(<size>) [auto_increment] [unsigned] [zerofill] A whole number,
4 bytes, with a maximum range of -2,147,483,648 to
2,147,483,647 (unsigned: 0 to 4,294,967, 295)

String

 CHAR
char(<size>) [binary] Fixed length – for storing strings that won't
vary much in size. Range of 0 to 255, stores that amount in bytes

 VARCHAR
varchar(<size>) [binary] Variable length – for storing strings that
will vary in size. Range of 0 to 255, stores that amount in bytes,
plus 1 byte

1. mysql-connector
MySQL-Connector enables Python programs to access MySQL
databases, using an API that is compliant with the. It is written in pure
Python and does not have any dependencies except for the Python
Standard Library.

 Establish connection
For database interface/database programming ,connection must be
established.Before establishing connection there must be mysql
installed on the system and a database and table is already created.In
following way we can establish a connection with mysql database
through mysql.connector. import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="r
oot“,database =“school”) print(mydb
Alternatively we can write the following statement if we are using
mysqldb
import MySQLdb mydb =
MySQLdb.connect("localhost",“root",“root",“school" ) print(mydb

 Create cursor object and use it

import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="r
oot")
mycursor=mydb.cursor()
mycursor.execute("create database if not exists school")
mycursor.execute("show databases")
for x in mycursor:
print(x)
SQL TABLE:
TABLE: Air
Python Code:
import platform
import mysql.connector
import datetime
global z
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:")
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 yoy want to see classs type available : Enter 1 for
yes :")
ch=int(input("enter your choice:"))
if ch==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:-")
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:"))
if ch==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:"))
if ch==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:"))
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")
elif(d==5):
print("you have ordered sandwich")
a=int(input("enter quantity"))
s=50*a
print("your amount fopr 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")
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:"))
if ch==1:
sql="select * from lugage"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
y=int(input("Enter Your weight of extra lugage->"))
z=y*1000
print("your laundary bill:",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(res)

def Menuset():
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()
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'))
Menuset()
runagn=input("\n want to run again y/n:")
runagain()
Output Screenshot:
Limitations:
The Existing system includes problems like lack of time consuming,
accuracy, high cost, security problems, etc. There are many problems
in existing systems like:
 Manpower
 High cost
 Time and speed
 Security
 Complexity
 Maintenance
 Accuracy
 Storing
 Records might get lost or be insufficient due to manual errors.
 Maintaining and managing data is very costly and time
consuming, because there are many documents that have to be
maintained by each branch and copies have to be transferred to
relative branches.
 Transfer of information within the branches is costly and time
consuming

You might also like