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

CSC - File - Archit - and - Shubh - Recent

Uploaded by

poonam76kamboj
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 views22 pages

CSC - File - Archit - and - Shubh - Recent

Uploaded by

poonam76kamboj
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/ 22

N.C.

JINDAL PUBLIC SCHOOL,


PUNJABI BAGH, NEW DELHI-110026

CLASS: XII
SESSION: 2024-2025
COMPUTER SCIENCE PROJECT FILE
TOPIC: Flight Management System

SUBMITTED BY: Shubh


Archit Vij
Sarna
NAME: Shubh
Archit Vij
Sarna
CLASS:XII B
A
CBSE ROLL NO.:
INDEX

1. ACKNOWLEDGEMENT
2. CERTIFICATE
3. HARDWARE AND SOFTWARE
REQUIRED
4. INTRODUCTION OF THE TOPIC
5. SYNOPSIS OF THE PROJECT
6. CODE OF THE PROJECT
7. OUTPUT OF THE PROJECT
8. REFERENCES
ACKNOWLEDGMENT

I express my sincere thanks to Mrs.


Vijay Lakshmi Gupta ma’am, my
computer sciences teacher who guided
me throughout the project. I am
thankful for the aspiring guidance and
invaluably constructive criticism during
the project work. I am sincerely grateful
to her for sharing her truthful views. My
project has been completed because of
her guidance
CERTIFICATE

This is to certify that Shubh Sarna of Class


12th – B ,
Roll No.- and Archit Vij of
class 12th- A, Roll No.- has
completed her project file under my
guidance. She has taken proper care and
shown utmost sincerity in the completion of
this project. I certify that this project is upto
my expectations and as per CBSE
guidelines.

SIGNATURE
HARDWARE AND SOFTWARE REQUIRED

HARDWARE
1. LAPTOP
2. MOBILE PHONE

SOFTWARE
1. PYTHON (LATEST VERSION)
2. MICROSOFT EXCEL(CSV FILES)
WHAT IS 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. 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.

NEED FOR FLIGHT MANAGEMENT SYSTEM


1. Minimized documentation and no duplication of
records.
2. Reduced paper work.
3. Improved patient care
4. . Better Administration Control
5. Faster information flow between various
departments
6. Smart Revenue Management
7. Effective billing of various services
8. Exact stock information

SYNOPSIS OF THE PROJECT

The Flight Management System is a simple


Python project that allows users to manage flight
and passenger details. The system collects basic
information such as flight number, departure
city, arrival city, passenger name ,contact
details, and ticket price. All this information is
stored in a CSV file for easy data management.
Python is used to take user input and save the
details in a CSV file, which acts as a basic
database. The system also allows users to view
the stored records, making it easy to track flight
and passenger information.
The main objective of the project is to store and
manage essential flight and passenger data,
including ticket price, in a simple and efficient
way using Python and CSV files.
CODE

import csv
import os

FILENAME = 'Flight.csv'

def menu():
while True:
print("\nFLIGHT MANAGEMENT SYSTEM")
print("1. Add Records")
print("2. Display Records")
print("3. Modify Records")
print("4. Delete Records")
print("5. Search Records")
print("6. Exit")
choice = input("Enter your choice (1-6): ")

if choice == '1':
add_record()
elif choice == '2':
display_record()
elif choice == '3':
modify_record()
elif choice == '4':
delete_record()
elif choice == '5':
search_record()
elif choice == '6':
print("Exiting program. Goodbye!")
break
else:
print("Invalid choice. Please enter a number
between 1 and 6.")

def add_record():
flight_no = input("Enter flight number: ")

if check_duplicate(flight_no):
print("Flight number already exists. Please enter a
unique flight number.")
return

departure = input("Enter departure city: ")


arrival = input("Enter arrival city: ")
price = input("Enter price: ")

confirm = input("Do you want to confirm this flight


booking? (y/n): ").lower()
if confirm == 'y':
name = input("Enter passenger name: ")
phone = input("Enter phone number: ")
email = input("Enter email address: ")
save_record(flight_no, name, phone, email,
departure, arrival, price)
else:
print("Flight booking cancelled.")

def check_duplicate(flight_no):
if os.path.exists(FILENAME):
with open(FILENAME, mode='r') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == flight_no:
return True
return False

def save_record(flight_no, name, phone, email,


departure, arrival, price):
with open(FILENAME, mode='a', newline='') as file:
writer = csv.writer(file)
if file.tell() == 0: # If file is empty, write header
writer.writerow(['Flight Number', 'Name',
'Phone', 'Email', 'Departure', 'Arrival', 'Price'])
writer.writerow([flight_no, name, phone, email,
departure, arrival, price])
print("Record saved.")

def display_record():
if not os.path.exists(FILENAME):
print("No records available.")
return

with open(FILENAME, mode='r') as file:


reader = csv.reader(file)
print("\nFLIGHT RECORDS:")
for row in reader:
print(" | ".join(row))

def modify_record():
flight_no = input("Enter flight number to modify: ")
records = []
found = False

if os.path.exists(FILENAME):
with open(FILENAME, mode='r') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == flight_no:
found = True
print("\nCurrent details: Flight Number: %s,
Name: %s, Phone: %s, Email: %s, Departure: %s,
Arrival: %s, Price: %s" % (row[0], row[1], row[2],
row[3], row[4], row[5], row[6]))
confirmation = input("Are you sure you
want to modify this record? (y/n): ").lower()
if confirmation == 'y':
name = input("New passenger name
(leave blank to keep current): ") or row[1]
phone = input("New phone number
(leave blank to keep current): ") or row[2]
email = input("New email address
(leave blank to keep current): ") or row[3]
departure = input("New departure city
(leave blank to keep current): ") or row[4]
arrival = input("New arrival city (leave
blank to keep current): ") or row[5]
price = input("New price (leave blank to
keep current): ") or row[6]

records.append([flight_no, name, phone,


email, departure, arrival, price])
else:
records.append(row) # Keep the
original record
else:
records.append(row)

if not found:
print("Flight number not found.")
return

with open(FILENAME, mode='w', newline='') as file:


writer = csv.writer(file)
writer.writerows(records)
print("Record modified.")

def delete_record():
flight_no = input("Enter flight number to delete: ")
records = []
found = False

if os.path.exists(FILENAME):
with open(FILENAME, mode='r') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == flight_no:
found = True
confirmation = input("Are you sure you
want to delete this record? (y/n): ").lower()
if confirmation == 'y':
print("Record deleted.")
continue # Skip appending this row
records.append(row)

if not found:
print("Flight number not found.")
return

with open(FILENAME, mode='w', newline='') as file:


writer = csv.writer(file)
writer.writerows(records)

def search_record():
flight_no = input("Enter flight number to search: ")
found = False

if os.path.exists(FILENAME):
with open(FILENAME, mode='r') as file:
reader = csv.reader(file)
print("\nSEARCH RESULTS:")
for row in reader:
if row[0] == flight_no:
found = True
print(" | ".join(row))
break

if not found:
print("Flight number not found.")

menu()

OUTPUT
ADDITION OF DETAILS
 DISPLAY OF RECORDS

 MODIFICATION OF RECORDS
 DELETION OF RECORDS
 SEARCHING OF A RECORD
REFERENCES

 www.google.com

 www.wikipedia.com

 Class 11th and 12th N.C.E.R.T book.

You might also like