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

Computer Project

This document contains source code and documentation for a flight management system project. It includes code to create a database called "airlines" and tables to store passenger details, flight details, class type, food items, and luggage information. The source code connects to the MySQL database and includes commands to insert sample data into the food items table. It also mentions creating admin and user interfaces to allow interaction with the system. The objective of the project is to apply programming skills to automate flight booking and management tasks.
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)
50 views

Computer Project

This document contains source code and documentation for a flight management system project. It includes code to create a database called "airlines" and tables to store passenger details, flight details, class type, food items, and luggage information. The source code connects to the MySQL database and includes commands to insert sample data into the food items table. It also mentions creating admin and user interfaces to allow interaction with the system. The objective of the project is to apply programming skills to automate flight booking and management tasks.
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/ 28

MAR GREGORIOS MEMORIAL

RESIDENTIAL PUBLIC SCHOOL


KOTTARAKARA

COMPUTER SCIENCE
2023-24
FLIGHT MANAGEMENT SYSTEM

Submitted for the AISSE practical examination 2023-24


Certified and bonafide work done by

Name : SREEJITH M.
Class : XII E
Reg.No. :
External Examiner :
Internal Examiner :
DECLARATION

I Do Hereby Declare That the Project


Entitled “FLIGHT MANAGEMENT SYSTEM”
Being Submitted in My Authenticated
Work in Partial Fulfillments of the
Requirements for The CBSE Certification.
ACKNOWLEDGEMENT

In the accomplishment of this project


successfully many people who best have owed upon me
their blessings and the heart pledged support, this time I
am utilizing to thank all the people who have been
concerned with this project. Firstly, I thank God for
making me able to yield within the span of completing
this project. Then I would like to thank my
and, whose valuable guidance has been what helped me
patch this project and make it full proof success.

I would like to express our sincere gratitude to our


computer science teacher MS.DEVU R UNNITHAN, for
her vital support, guidance and encouragement , without
which this project would not have come forth. I am
overwhelmed deep sense of gratitude to the luminary The
Principal, MRS. NISHA S who has been continuously
motivating and extending their helping hand to us.
We would also like to express our gratitude to our MGM
RESIDENTIAL PUBLIC SCHOOL for letting us use the
school laboratory.
CERTIFICATE

This is to certify that this is a bonafide record of


Project work done by SREEJITH M. of Class XII –
E of MGM Residential Public School, Kottarakara.

Internal Examiner External Examiner

Principal
TABLE OF CONTENTS
PAGE
Sl.no. DESCRIPTION
NO

1. INTRODUCTION 6-7

2. OBJECTIVE OF THE PROJECT 8

3. PROPOSED SYSTEM 9
SYTEM DEVELOPMENT LIFE
4.
CYCLE(SDLC)
10

5. FLOWCHART REPRESENTATION 11

6. SOURCE CODE AND MYSQL 12-21

7. OUTPUT 22-23

8. FUTURE ENHANCEMENT 24

9. INSTALLATION PROCEDURE 25-26


HARDWARE AND SOFTWARE
10.
REQUIREMENTS
27

11. BIBLIOGRAPHY 28

INTRODUCTION
A flight management system (FMS) is a
fundamental component of a modern airliner's avionics. An FMS
is a specialized computer system that automates a wide variety of
in-flight tasks, reducing the workload on the flight crew to the
point that modern civilian aircraft no longer carry flight engineers
or navigators. A primary function is in-flight management of the
flight plan. The main objective of the python project on Flight
Management System is to manage the details of booking,
payments, seats, and flights. The project is built at
administrative end as well as User End and both Administrator
and User is guaranteed access to use the System. 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 discountsare
validated and does not take invalid values.
2. Each form of sales, discounts, bookings cannotaccept the
blank values.
3. Avoiding errors in data.
4. Controlling amount of input.

 NEED OF FMS
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 OF FMS
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.
OBJECTIVE OF THE PROJECT
The objective of this project is to let the students apply
the programming knowledge into a real-world situation/problem
and exposed the students how programming skills helps in
developing a good software

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively


when developing small to medium sized projects.

3. Write effective procedural code to solve small to medium


sized problems.

4. Students will demonstrate a breadth of knowledge in


computer science, as exemplified in the areas of systems, theory
and software development.

5.Students will demonstrate ability to conduct a research or


applied computer science project, requiring writing and
presentation skills which exemplify scholarly style in computer
science.

PROPOSED SYSTEM
Today one cannot afford to rely on the fallible
human beings of be really wants to stand against today's
merciless competition where not to wise saying "to err is human"
no longer valid, it's outdated to rationalize your mistake. So, to
keep pace with time, to bring about the best result without
malfunctioning and greater efficiency so to replace the unending
heaps of flies with a much sophisticated hard disk of the
computer.

One has to use the data management software.


Software has been an ascent in atomization various
organizations. Many software products working are now in
markets, which have helped in making the organizations work
easier and efficiently. Data management initially had to maintain
a lot of ledgers and a lot of paper work has to be done but now
software product on this organization has made their work faster
and easier. Now only this software has to be loaded on the
computer and work can be done. This prevents a lot of time and
money. The work becomes fully automated and any information
regarding the organization can be obtained by clicking the
button. Moreover, now it's an age of computers of and
automating such an organization gives the better look.
SYTEM DEVELOPMENT LIFE CYCLE(SDLC)

The
systems development life cycle is a project management
technique that divides complex projects into smaller, more easily
managed segments or phases. Segmenting projects allows
managers to verify the successful completion of project phases
before allocating resources to subsequent phases.

Software development projects typically include


initiation, planning, design, development, testing,
implementation, and maintenance phases. However, the phases
may be divided differently depending on the organization
involved.

For example, initial project activities might be


designated as request, requirements-definition, and planning
phases, or initiation, concept-development, and planning phases.
End users of the system under development should be involved
in reviewing the output of each phase to ensure the system is
being built to deliver the needed functionality.
FLOWCHART

Start Python

Creation of table with


Passenger Details,
Flight Details, class
type etc..

Program execution by
(1.”MySQL connecter”)
(2.”Creating Database”)
(3.”Customer Details”)
(4.”Flight Details”)
(5.”Luggage”)
(6.”Food Details”)
(7.”Class type”)
(8.”Admin Interface”)
(9.”User Interface”)
(10.”Main interface”)

Stop
SOURCE CODE
=============================================

import mysql.connector #_______mysql connector package

obj=mysql.connector.connect(host="localhost",user="root",passwd="admin")
#here obj is connection object

#CREATING DATABASE & TABLE


mycursor=obj.cursor()
#________cursor is used to row by row processing of record in the result
set

mycursor.execute("create database if not exists airlines")


#______mycursor is cursor object

#CREATING DATABASE
Mycursor.execute(“create database if not exists airlines”)
mycursor.execute("use airlines")

#CREATING TABLE FOR ODER FOOD


mycursor.execute("create table if not exists food_items(sl_no int(4) auto_increment primary
key,food_name varchar(40)not null,price int(4) not null)")
mycursor.execute("insert into food_items values({},'{}',{})".format('null','pepsi',150))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','coffee',70))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','tea',50))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','water',60))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','milk shake',80))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','chicken burger',160))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','cheese pizza',70))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','chicken biryani',300))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','plane rice',80))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','aloo paratha',120))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','roti sabji',100))
mycursor.execute("insert into food_items values({},'{}',{})".format('null','omelette',50))
#CREATING TABLE FOR LUGGAGE ENTRY

mycursor.execute("create table if not exists luggage(luggage_id int(4) auto_increment


primary key,weight int(3)not null,price int(4) not null)")
mycursor.execute("insert into luggage values({},'{}',{})".format('null',25,1200))
mycursor.execute("insert into luggage values({},'{}',{})".format('null',17,950))
mycursor.execute("insert into luggage values({},'{}',{})".format('null',30,1500))
mycursor.execute("insert into luggage values({},'{}',{})".format('null',40,2000))

#CREATING TABLE FOR CUSTOMER DETAILS

mycursor.execute("create table if not exists cust_details(cust_id int(4) auto_increment


primary key,cust_name varchar(40)not null,Mob_no bigint(10) not null,fl_id int(10)not
null,fl_name varchar(40)not null,class varchar(15)not null,dept varchar(20)not null,dest
varchar(20)not null,day varchar(15)not null,f_time time not null,price int(10)not null)")

#CREATING TABLE FOR CUSTOMER'S FLIGHT DETAILS

mycursor.execute("create table if not exists flight_details(flight_id int(4),flight_name


varchar(40)not null,departure varchar(40),destination varchar(40),day varchar(20),f_time
time,bussiness int(10),economic int(10),middle int(10))")
mycursor.execute("insert into flight_details values({},'{}','{}','{}','{}','{}',{},{},{})".format('null','Spice
Jet','Delhi','Mumbai','Sunday','04:00:00',14000,15000,17000))
mycursor.execute("insert into flight_details values({},'{}','{}','{}','{}','{}',{},{},{})".format('null','Air
India','Guwahati','Kolkata','Sunday','10:30:00',15000,17560,21000))
mycursor.execute("insert into flight_details values({},'{}','{}','{}','{}','{}',{},{},{})".format('null','GO
First','Haryana','Goa','Tuesday','08:00:00',11000,13000,15000))

#CREATING TABLE FOR CLASS DETAILS


mycursor.execute("create table if not exists class_details(class_id int(4) auto_increment
primary key,classtype varchar(40)not null,price int(40))")
mycursor.execute("insert into class_details values({},'{}',{})".format('null','Economic',2000))
mycursor.execute("insert into class_details values({},'{}',{})".format('null','Middle',4000))
mycursor.execute("insert into class_details values({},'{}',{})".format('null','Bussiness',6000))

obj.commit()
#TO ENTER THE DETAILS OF LUGGAGE
def luggage():
print("what do you want to do?")
print("1. add luggage")
print("2. delete luggage")
x=int(input("enter your choice: "))
if x==1:
lname=input("enter luggage type: ")
mycursor.execute("insert into luggage values({},'{}'".format('null',lname))
elif x==2:
lid=int(input("enter your luggage id: "))
mycursor.execute("delete from luggage where luggage_id={}".format(lid))
else:
print(" **************** PLEASE ENTER A VALID OPTION
**************************** ")
food()
obj.commit()

#TO UPDATE THE INFORMATION OF FOOD DETAILS


def food():
print("what do you want to do?")
print("1. add new items")
print("2. update price")
print("3. delete items")
x=int(input("enter your choice: "))
if x==1:
fname=input("enter food name: ")
fprice=int(input("enter food price: "))
mycursor.execute("insert into food_items values({},'{}',{}".format('null',fname,fprice))
elif x==2:
fid=int(input("enter food id: "))
fprice=int(input("enter new price: "))
mycursor.execute("update food_items set price={} where
food_id={}".format(fid,fprice))
elif x==3:
fid=int(input("enter food id: "))
mycursor.execute("delete from food_items where where food_id={}".format(fid))
else:
print(" **************** PLEASE ENTER A VALID OPTION ****************************
")
food()
obj.commit()

#TO UPDATE THE INFORMATION OF CLASSTYPE


def classtype():
print("what do you want to do? ")
print("1. change the classtype name")
print("2. change the price of classtype")
x=int(input("enter your choice: "))

if x==1:
oname=input("enter old name: ")
nname=input("enter new name: ")
mycursor.execute("update classtype set '{}'='{}'".format(oname,nname))

def fooditems():
print(" ")
print(" ")
print(" THE AVAILABLE FOODS ARE: ")
print(" ")
print(" ")
mycursor.execute("select * from food_items")
x=mycursor.fetchall()
for i in x:
print(" FOOD ID: ",i[0])
print(" FOOD Name: ",i[1])
print(" PRICE: ",i[2])
print("__________________________________________________________________
________________________")

user()

#Admin Interface after verifying password


def admin1():
print("************ WHAT'S YOUR TODAYS GOAL? ****************")
print("1. update details")
print("2. show details")
print("3. job approval")
x=int(input("select your choice: "))
while True:
if x==1:
print("1. classtype")
print("2. food")
print("3. luggage")
x1=int(input("enter your choice"))
if x1==1:
classtype()
elif x1==2:
food()

elif x1==3:
luggage()
else:
print(" ********************** PLEASE ENTER A VALID OPTION
******************************** ")
admin1()
elif x==2:
print("1. classtype")
print("2. food")
print("3. luggage")
print("4. records")
y=int(input("from which table: "))
if y==1:
mycursor.execute("select * from classtype")
else:
mycursor.execute("select * from customer_details")
z=mycursor.fetchall()
for i in z:
print(i)
print("**************** THESE ABOVE PEOPLE HAVE
BOOKED TICKET *****************************")
break

#Admin Interface
def admin():
while True:
sec=input("enter the password: ")
if sec=="admin":
admin1()
else:
print("************YOUR PASSWORD IS INCORRECT*********")
print("***********PLEASE TRY AGAIN*****************")
admin()
break

#TO SEE THE RECORDS OF THE CUSTOMER


def record():
cid=int(input("enter your customer id: "))
mycursor.execute(" select * from customer_details where cus_id={}".format(cid))
d=mycursor.fetchall()
print("YOUR DETAILS ARE HERE...........")
print("customer id: ",d[0])
print("name: ",d[1])
print("mobile number: ",d[2])
print("flight id: ",d[3])
print("flight name",d[4])
print("classtype: ",d[5])
print("departure place",d[6])
print("destination",d[7])
print("flight day: ",d[8])
print("flight time: ",d[9])
print("price of ticket: ",d[10])
print("date of booking ticket: ",d[11])

#TO BOOK THE TICKETS


def ticketbooking():
cname=input("enter your name: ")
cmob=int(input("enter your mobileno: "))
if cmob==0000000000:
print(" MOBILE NUMBER CANT BE NULL ")
ticketbooking()
fid=int(input("enter flight id: "))
fcl=input("enter your class: ")
fname=input("enter your flight name")
dept=input("enter departure place: ")
dest=input("enter destination: ")
fday=input("enter flight day: ")
ftime=input("enter flight time: ")
fprice=input("enter ticket rate: ")
mycursor.execute("insert into customer_details values({},'{}',{},{},'{}','{}','{}','{}','{}','{}',
{}".format('null',cnam e,cmob,fid,fname,fcl,dept,dest,fday,ftime,"curdate()"))

obj.commit()
#TO SEE THE AVAILABLE FLIGHTS
def flightavailable():
print(" ")
print(" ")
print(" THE AVAILABLE FLIGHTS ARE: ")
print(" ")
print(" ")
mycursor.execute("select * from flight_details")
x=mycursor.fetchall()
for i in x: print(" ")
print(" Flight ID: ",i[0])
print(" Flight Name: ",i[1])
print(" departure: ",i[2])
print(" Destination: ",i[3])
print(" Take off Day: ",i[4])
print(" Take off time : ",i[5])
print(" bussiness : ",i[6])
print(" middle : ",i[7]) print(" economic : ",i[8])
print("__________________________________________________________________
________________________")
user()

#USER INTERFACE
def user():
while True:
print("************** MAY I HELP YOU? *****************")
print("1. flight details")
print("2. food details")
print("3. book ticket")
print("4. my details")
print("5. exit")
x=int(input("enter your choice: "))
if x==1:
flightavailable()
elif x==2:
fooditems()
elif x==3:
ticketbooking()
elif x==4:
records()
else:
print("************ PLEASE CHOOSE A CORRECT OPTION ************")
user()
break
print("****************** WELCOME TO LAMNIO AIRLINES **********************")
print("************ MAKE YOUR JOURNEY SUCCESS WITH US! *****************")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")

#Main Interface
def menu1():
print("**************** YOUR DESIGNATION? *******************")
print("1. admin")
print("2. user")
print("3. exit")
x=int(input("choose a option: "))
while True:
if x==1:
admin()
elif x==2:
user()
else:
print("************PLEASE CHOOSE A CORRECT
OPTION******************")
menu1()
break
menu1()

MY SQL
 Tables in database airlines:
 Description and datas in table class_details:
 Description and data in table customer_details:

 Description and datas in table flight_details:


 Description and datas in table food_items:

 Description and datas in table luggage:


OUTPUT
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 assengers 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
makingreservations from the counters.
INSTALLATION PROCEDURE

Flight Management System :-


---------------------------------

Pre Requisites :-
------------------

1.You have to have the following software for


the successful running of this software, which are
I. Python from(‘www.python.org’)
II. MySQL from(‘www.mysql.org’)
Installation :-
-----------------

1.There are two folders namely ‘Table file’ and


‘Main file’
2.The folder ‘Table file’ contains the source
code of the program in python language.

3.Open the files in any python shell and run


it to start and work on the software.To run the
program by 3rd step you have to pre install the
following modules :-
 Mysql.connector

4.The folder ‘Main file’ contain two files namely


‘main.exe’ and ‘Tables_in_mysql.exe’

5.First run the “’Table_in_mysql.exe’ to create


the tables in MySQL.

6.Then run the file ‘main.exe’ to start and work


on the software.
HARDWARE AND SOFTWARE
REQUIREMENTS

 OPERATING SYSTEM :- Windows 7 and


above
 RAM :- 8.00GB
 HARD DISK :- SSD 256GB
 KEYBOARD AND MOUSE

 SOFTWARE REQUIREMENTS:
 PYTHON 3.10
 MYSQL
 PYTHON CONNECTOR
BIBLIOGRAPHY

 Computer Science with Python-Class XII By: Sumitha Arora

 https://kvcoders.in/

 https://en.wikipedia.org/wiki/E_(mathematical_constant)

You might also like