0% found this document useful (0 votes)
10 views26 pages

CS Project

Uploaded by

pradhumankamble6
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)
10 views26 pages

CS Project

Uploaded by

pradhumankamble6
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/ 26

PM SHRI KENDRIYA VIDYALAYA NO.

2 AFS PUNE

C.S.PROJECT
AIR TICKET RESERVATION
Subject: - Computer Science
(083)

Submitted by:- Guided By:-


Pradhuman Kamble Hari Shankar Rai
Class – 12A PGT CS
Roll no.-
Academic Year: 2024-25
ACKNOWLEDGEMENT
I would like to express my special thanks of
gratitude to our principal Mr. Bharat Bhushan Sir
and to my CS teacher Hari Shankar Rai sir who
gave me the golden opportunity to do this
wonderful project and provided all necessary
support to do the project on the topic AIR TICKET
RESERVATION which also allowed me to do 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 completing this
project within the limited time frame.

PRADHUMAN KAMBLE
CERTIFICATE

This to certify that PRADHUMAN KAMBLE


of class 12A has successfully completed
his/her python project on the topic ‘AIR
TICKET RESERVATION ’ for the subject
Computer Science (083) as prescribed by
CBSE, under the guidance of Hari Shankar
Rai, PGT CS during the academic year
2024-2025.

Teacher signature Principal signature

Examiner signature
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
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
link 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.

Source Code Screening


DBMS: MySQL
Host: local host
User: root
Pass: root
Database: hotel
Table Structure: (Images Bellow)
PYTHON CODE:
import os
import platform
import mysql.connector
import pandas as pd
import datetime
mydb = mysql.connector.connect(user='root',
password='12345', host='localhost', database='air')
mycursor = mydb.cursor()

def register_cust():
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 = tuple(L)
sql = "INSERT INTO pdata (custname, addr, jrdate, source,
destination) VALUES (%s, %s, %s, %s, %s)"
mycursor.execute(sql, cust)
mydb.commit()

def class_type_view():
print("Do you want to see class 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 ticket_price():
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: "))
n = int(input("No of passengers: "))
if x == 1:
print("You have opted for First class")
s = 6000 * n
elif x == 2:
print("You have opted for Business class")
s = 4000 * n
elif x == 3:
print("You have opted for Economy class")
s = 2000 * n
else:
print("Please choose a class type")
s=0
print("Your room rent is =", s, "\n")

def menu_view():
print("Do you want to see the 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 order_item():
global s
print("Do you want to see the 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 the 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 cold drink")
a = int(input("Enter quantity: "))
s = 20 * a
print("Your amount for cold drink is:", s, "\n")
elif d == 4:
print("You have ordered samosa")
a = int(input("Enter quantity: "))
s = 10 * a
print("Your amount for samosa is:", s, "\n")
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 milk 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 luggage_bill():
global z
print("Do you want to see the rate for luggage? Enter 1 for
yes:")
ch = int(input("Enter your choice: "))
if ch == 1:
sql = "SELECT * FROM luggage"
mycursor.execute(sql)
rows = mycursor.fetchall()
for x in rows:
print(x)
y = int(input("Enter the weight of extra luggage: "))
z = y * 1000
print("Your luggage bill:", z, "\n")
return z

def lb():
print(z)

def res():
print(s)

def ticket_amount():
a = input("Enter customer name: ")
print("Customer name:", a, "\n")
print("Luggage bill:")
lb()
print("Food bill:")
res()
print("Total amount")

def menu_set():
print("AIR TICKET RESERVATION")
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")

try:
userinput = int(input("Enter your choice: "))
except ValueError:
exit("\nHi, that's not a number")

if userinput == 1:
register_cust()
elif userinput == 2:
class_type_view()
elif userinput == 3:
ticket_price()
elif userinput == 4:
menu_view()
elif userinput == 5:
order_item()
elif userinput == 6:
luggage_bill()
elif userinput == 7:
ticket_amount()
elif userinput == 8:
quit()
else:
print("Enter correct choice")

def run_again():
runagn = input("\nWant to run again y/n: ")
while runagn.lower() == 'y':
if platform.system() == "Windows":
os.system('cls')
else:
os.system('clear')
menu_set()
runagn = input("\nWant to run again y/n: ")

run_again()

OUTPUT SCREEN
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. Airline reservation system make
the life of passengers very easy as they don’t
need to stand in queues for getting their seats
reserved.
4. 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

1. http://www.google.com/

2. http://en.wikipedia.org

3. Computer science with python By


Sumita Arora

You might also like