CS Assignment
CS Assignment
SUBMITTED BY:
GOKUL SJ
S.S.PRAJAN
N.R.MADHUSOODHAN
XII- B
Sri Nachammal Vidyavani Senior Secondary School (CBSE), Avinashi, has done his / her
Registration Number:
Place:
ACKNOWLEDGEMENT
We take this occasion to thank to our beloved Chairman of Sri Nachammal Vidyavani Senior Secondary
School, almighty for blessing us with his graceand taking our endeavor to a successful culmination.
We extend our sincere thanks to our respected Principal Ms. V. Sharmila Sunitha M.Sc., M.Ed., for
allowing us to use the facilities available.
We extend our sincere and heartfelt thanks to our guide Mr. P. Arun, M.Tech.,for providing us with the
right guidance and advice at the crucial junctures and for showing me the right way.
We would like to thank the other faculty members also, at this occasion. Last but not the least, we would
like to thank our friends and family for the support and encouragement they have given us during the course of
our work.
TABLE OF CONTENT
01 INTRODUCTION 1
03 PROPOSED SYSTEM 5
05 FLOW CHART 7
06 SOURCE CODE 8
07 OUTPUT 15
08 TESTING
18
09 INSTALLATION PROCEDURE
19
10 BIBLIOGRAPHY 20
AIRTICKETRESERVATION
INTRODUCTION
Airline reservation systems were first introduced in the late 1950s as relatively simple standalone
systemsto control flight inventory, maintain flight schedules , seat assignments and aircraft
loading. The modern airline reservation system is comprehensive suite of products to provide a
system that assists with a variety of airline management tasks and service customer needs from
the time of initial reservation through completion of the flight.
One of the most common modes of travel is traveling by air.Customers who wish totravel by air
nowadays have a wide variety of airlines and a range of timings to choose from . Nowadays
competition is so fierce between airlines that there are lot of discounts and a lot of luxuries given
to customers that will give an edge tothat particular airline.
The World Wide Web has become tremendously popular over the last four years , and currently
most of the airlines have made provision for online reservation of their flights . The Internet has
become a major resource for people looking for making reservations online without the hassle of
meeting travel agents.
My Project intends to serve these purposes . It intends to check all the available airline databases
and return a string of results , which can help them in their travel plans . The objective of this
project is to create an airline reservation system where a traveler can request all flight information
as per their journey dates . They can get information regarding time ,cost , etc all at the same time
and place . When the customer calls the Counter Assistant. for his / her travel needs , the counter
assistant will enter the customer's details (flight requirements) in the system The system displays
all the available airlines , schedules and prices . This system would help the airline to better serve
its customers by catering to their needs. The site would use a Database to hold this information as
well as the latest pricing and availability information for the airlines.
1
HISTORY OF PYTHON
Python is a widely used general-purpose, high-level programming language. It was initially designed by Guido
van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on
code readability, and its syntax allows programmers to express concepts in fewer lines of code
In the late 1980s, history was about to be written. It was that time when working on Python started. Soon after
that, Guido Van Rossum began doing its application based work in December of 1989 by at Centrum Wiskunde
& Informatica (CWI) which is situated in Netherland. It was started firstly as a hobby project because he was
looking for an interesting project to keep him occupied during Christmas. The programming language which
Python is said to have succeeded is ABC Programming Language, which had the interfacing with the Amoeba
Operating System and had the feature of exception handling. He had already helped to create ABC earlier in his
career and he had seen some issues with ABC but liked most of the features. After that what he did as really
very clever. He had taken the syntax of ABC, and some of its good features. It came with a lot of complaints
2
too, so he fixed those issues completely and had created a good scripting language which had removed all the
flaws. The inspiration for the name came from BBC’s TV Show – ‘Monty Python’s Flying Circus’, as he was a
big fan of the TV show and also 2he wanted a short, unique and slightly mysterious name for his invention and
hence he named it Python! He was the “Benevolent dictator for life” (BDFL) until he stepped down from the
position as the leader on 12th July 2018. For quite some time he used to work for Google, but currently, he is
working at Dropbox.
The language was finally released in 1991. When it was released, it used a lot fewer codes to express the
concepts, when we compare it with Java, C++ & C. Its design philosophy was quite good too. Its main objective
is to provide code readability and advanced developer productivity. When it was released it had more than
enough capability to provide classes with inheritance, several core data types exception handling and functions.
Following are the illustrations of different versions of Python along with the timeline.
3
OBJECTIVE 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.
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.
4
PROPOSED SYSTEM
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.
5
HARDWARE ANDSOFTWAREREQUIREMENTS
For the hardware requirements like memory restrictions, cache size, the processor, RAM size
etc... those are required for the software to run.
Minimum Hardware Requirements
Processor Pentium IV
Hard Disk Dirve 100 GB
RAM 1 Gb
Preferred hardware requirements
Processor Core i3
Hard Disk Drive 500 GB
RAM 4 G
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
CHARACTERISTICS OF DBMS:
• It reduces the redundancy
• Reduction of data in inconsistency
• Data sharing
• Data standardization
6
FLOWCHART
7
SOURCECODE
import os
import platform
importmysql.connector
import pandas as pd
importdatetime mydb = mysql.connector.connect(user='root', password='12345',
host='localhost',
database='air')
mycursor=mydb.cursor()
defregistercust():
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()
defclasstypeview():
print("Do you want to see class type available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
ifch==1:
8
sql="select * from classtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
defticketprice():
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")
defmenuview():
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)
9
deforderitem():
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)
10
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")
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")
deflugagebill():
global z
11
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()
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) defticketamount():
a=input("enter customer name:")
print("customer name :",a,"\n")
print("luggage bill:")
print(lb)
print("food bill:")
print(“total amount”)
defMenuset():
print(“AIR TICKET RESERVATION”)
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 luggage bill")
print("enter 7 : for complete amount")
print("enter 8 : for exit")
'''try:
#userinput=int(input("please select an above option:"))
Except Value Error:
12
exit("\n hi thats not a number")'''
13
SOURCE CODE SCREENING
DBMS: MySQL
Host: local host
User: root
Pass: root
Database: hotel
Table Structure: (Images Bellow)
14
OUTPUTSCREEN
15
16
FUTURE ENHANCEMENT
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.
17
TESTING
Software Testing is an empirical investigation conducted to provide stakeholders with information about the
quality of the product or service under test , with respect to the context in which it is intended to operate.
Software Testing also provides an objective, independent view of the software to allow the business to
appreciate and understand the risks at implementation of the software. Test techniques include, but are not
limited to, the process of executing a program or application with the intent of finding software bugs. It can
also be stated as the process of validating and verifying that a software program/application/product meets the
business and technical requirements that guided its design and development, so that it works as expected and
can be implemented with the same characteristics. Software Testing, depending on the testing method
employed, can be implemented at any time in the development process, however the most test effort is
employed after the requirements have been defined and coding process has been completed.
CODE:
⚫ Statement Coverage: Which reports on the number of lines executed to complete the test.
18
INSTALLATION PROCEDURE
Pre-Requisites: -
1. You have to have the following software for the successful running of this software;
which are
I) Python (Only for the First time), it is
downloadable from 'www.python.org'.
II) MySQL (Only for the First time), it is
downloadable from 'www.mysql.org'.
Installation: -
1. There will be two folders namely 'Python Files' and 'EXE files'.
2. The folder 'Python Files' will contain the source code of the software in python language. If you are
running the software by the 3rd step mentioned below you have to pre install the following modules:
I) MySQL. Connectors
II) matplotlib.
3. Open the files in any python editors and run it to start and work on the software.
4. The folder 'EXE files' will contain two files namely 'main.exe' and 'Tables_in_mysql.exe'.
6. Then run the file 'main.exe' to start and work on the software.
19
BIBLIOGRAPHY
1. http://www.google.com/
2. http://en.wikipedia.org
3. Computer science with python by Sumita Arora
20