0% found this document useful (0 votes)
15 views15 pages

My CS Project2

The document is a certificate for a student named Prasad Satyam Kumar who completed a school project on flight management systems under the supervision of their teacher Vinay Kumar. The certificate certifies that the project meets the expectations and guidelines of the CBSE board. It is signed by the internal and external examiners and principal.

Uploaded by

Rahul Meta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

My CS Project2

The document is a certificate for a student named Prasad Satyam Kumar who completed a school project on flight management systems under the supervision of their teacher Vinay Kumar. The certificate certifies that the project meets the expectations and guidelines of the CBSE board. It is signed by the internal and external examiners and principal.

Uploaded by

Rahul Meta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

FLIGHT MANAGEMENT

Name :Prasad Satyam Kumar


Class : XII A (Science)
Roll No : 11612375
Project Given By:Vinay Sir
CERTIFICATE
This is to certify that Prasad Satyam
kumar of class: XII A of K.V Railway has
done his project on FLIGHT
MANAGEMENT SYSTEM 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.

Internal Examiner External Examiner

Principal
ACKNOWLEDGMENT
It is with pleasure that I acknowledge my
sincere gratitude to our teacher,
MR.VINAY KUMAR SIR who taught and
undertook the responsibility of teaching
the subject computer science. I have
been greatly benefited from his classes.
I am especially indebted to our Principal
who has always been a source of
encouragement and support and
without whose inspiration this project
would not have been a successful I
would like to place on record heartfelt
thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students
for my batch their friendship & the fine
time that we all shared together

HARDWARE AND SOFTWARE


REQUIRED

HARDWARE
1. PC
2. MOBILE PHONE
SOFTWARE
• PYTHON (latest version)
• MYSQL
• PYTHON CONNECTOR
FLIGHT
The following are the main advantages:
• High Speed: It is the fast speed means of transport. ...
• Minimum Cost: ...
• Strategic Importance: ...
• Easy transport of costly and light goods: ...
• Free from physical barriers: ...
• Useful for Agriculture: ...
• Useful in natural calamities:

FLIGHT MANAGEMENT SYSTEM


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. Using various sensors (such as GPS and INS often backed up
by radio navigation) to determine the aircraft's position, the FMS can guide
the aircraft along the flight plan. From the cockpit, the FMS is normally
controlled through a Control Display Unit (CDU) which incorporates a
small screen and keyboard or
touchscreen. The FMS sends the flight plan for display to the Electronic
Flight Instrument System (EFIS), Navigation Display (ND), or Multifunction
Display (MFD). The FMS can be summarised as being a dual system
consisting of the Flight Management Computer (FMC), CDU and a cross
talk bus.
The modern FMS was introduced on the Boeing 767, though earlier
navigation computers did exist.[1] Now, systems similar to FMS exist on
aircraft as small as the Cessna 182. In its evolution an FMS has had many
different sizes, capabilities and controls. However certain characteristics
are common to all FMSs.
#FLIGHT MANAGEMENT SYSTEM

import mysql.connector

obj = mysql.connector.connect(host="localhost", user="root", passwd="Test")


mycursor = obj.cursor()

# CREATING DATABASE & TABLE


mycursor.execute("CREATE DATABASE IF NOT EXISTS airlines")
mycursor.execute("USE airlines")

# CREATING TABLE FOR ORDER 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)")

# Inserting data into food_items table


food_items_data = [
('pepsi', 150),
('coffee', 70),
('tea', 50),
('water', 60),
('milk shake', 80),
('chicken burger', 160),
('cheese pizza', 70),
('chicken biryani', 300),
('plane rice', 80),
('aloo paratha', 120),
('roti sabji', 100),
('omelette', 50),
]

mycursor.executemany("INSERT INTO food_items (food_name, price) VALUES (%s, %s)",


food_items_data)

# 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)")

# 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, cont_no BIGINT(10) NOT NULL)")

# CREATING TABLE FOR CUSTOMER'S FLIGHT DETAILS


mycursor.execute("CREATE TABLE IF NOT EXISTS flight_details(cus_id INT(4), "
"cus_name VARCHAR(40) NOT NULL, flight_id INT(4))")

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 (weight, price) 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")

# CREATING TABLE FOR CLASSTYPE


mycursor.execute("CREATE TABLE IF NOT EXISTS classtype(class_id INT(4) AUTO_INCREMENT
PRIMARY KEY, "
"class_name VARCHAR(40) NOT NULL, class_price INT(10) NOT NULL)")

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 (food_name, price) VALUES ('{}',
{})".format(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 sl_no={}".format(fprice,
fid))
elif x == 3:
fid = int(input("Enter food id: "))
mycursor.execute("DELETE FROM food_items WHERE sl_no={}".format(fid))
else:
print("Please enter a valid option")

# CREATING TABLE FOR CUSTOMER'S FLIGHT DETAILS


mycursor.execute("CREATE TABLE IF NOT EXISTS customer_details(cus_id INT(4)
AUTO_INCREMENT PRIMARY KEY, "
"cust_name VARCHAR(40) NOT NULL, cont_no BIGINT(10) NOT NULL, "
"flight_id INT(4), cus_name VARCHAR(40), classtype VARCHAR(20), "
"departure VARCHAR(50), destination VARCHAR(50), flight_day
VARCHAR(20), "
"flight_time TIME, price INT(10), date_of_booking DATE)")

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("The available foods are:")
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])

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 a ticket")
break

def admin():
while True:
sec = input("Enter the password: ")
if sec == "admin":
admin1()
else:
print("Your password is incorrect. Please try again")

def record():
cid = int(input("Enter your customer id: "))
mycursor.execute("SELECT * FROM customer_details WHERE cus_id={}".format(cid))
d = mycursor.fetchall()

if not d:
print("No customer details found for the provided ID.")
return

print("Your details are here...........")


print("Customer ID:", d[0][0])
print("Name:", d[0][1])
print("Mobile number:", d[0][2])
print("Flight ID:", d[0][3])
print("Flight Name", d[0][4])
print("Classtype:", d[0][5])
print("Departure place", d[0][6])
print("Destination", d[0][7])
print("Flight day:", d[0][8])
print("Flight time:", d[0][9])
print("Price of ticket:", d[0][10])
print("Date of booking ticket:", d[0][11])

def ticketbooking():
cname = input("Enter your name: ")
cmob = int(input("Enter your mobile no: "))
if cmob == 0000000000:
print("Mobile number can't 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 (cust_name, cont_no, flight_id,
cus_name, classtype, "
"departure, destination, flight_day, flight_time, price,
date_of_booking) "
"VALUES ('{}',{},{},'{}','{}','{}','{}','{}','{}',{},curdate())"
.format(cname, cmob, fid, fname, fcl, dept, dest, fday, ftime,
fprice))
obj.commit()

def flightavailable():
print("The available flights are:")
mycursor.execute("SELECT * FROM flight_details")
x = mycursor.fetchall()
for i in x:
print("Flight ID:", i[0])
print("Flight Name:", i[1])
print("Departure:", i[2])
print("Destination:", i[3])
print("Takeoff Day:", i[4])
print("Takeoff Time:", i[5])
print("Business:", i[6])
print("Middle:", i[7])
print("Economic:", i[8])
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:
record()
else:
print("Please choose a correct option")
user()
break

print("Welcome to Lamnio Airlines")


print("Make your journey successful with us!")

# Main Interface
def menu1():
print("Your designation?")
print("1. Admin")
print("2. User")
print("3. Exit")
x = int(input("Choose an option: "))
while True:
if x == 1:
admin()
elif x == 2:
user()
else:
print("Please choose a correct option")
menu1()
break

menu1()
#Code outputs
# output in mysql database

• 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:


BIBILIOGRAPHY

• www.google.com

• www.wikipedia.org

You might also like