Flight Reservation System
Flight Reservation System
Project report submitted in partial fulfillment of the Requirements for the Award of the
Degree of
BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE AND ENGINEERING
By
K.NITHIN SAI 24KB1A05T5
K.MOHITH KUMAR 24KB1A05V9
M.SHYAM 24KB1A05Z6
N.SRIVARDHAN 24KB1A05BQ
Under the Guidance of
P.SUNEETHA
CERTIFICATE
This is to certify that the project report entitled FLIGHT RESERVATION SYSTEM being
submitted by
M.SHYAM 24KB1A05Z6
N.SRIVARDHAN 24KB1A05BQ
in partial fulfillment for the award of the Degree of Bachelor of Technology in Computer
ii
B.Tech,M.Tech,[Ph.D] REDDY
ASS.PROF. M.Tech, Ph.D
Head of the Department
DECLARATION
I hereby declare that the dissertation entitled FLIGHT RESERVATION SYSTEM submitted
for the B.Tech Degree is my original work and the dissertation has not formed the basis for
the award of any degree, associateship, fellowship or any other similar titles.
iii
ACKNOWLEDGEMENT
/MR. SIVANRAJ SIR for their invaluable guidance and support throughout the development
of this project. Their insights and encouragement have been instrumental in shaping the
Special thanks to my classmates and friends for their continuous encouragement and
Lastly, I extend my heartfelt appreciation to my family for their unwavering support and
iv
✈️Abstract: Flight Reservation System in C
platform. The system employs arrays to manage a fixed set of flights, each
availability. For each flight, a dynamic linked list is utilized to handle passenger
information, including name and passport number, allowing efficient addition and
passport number.
flight.
The integration of arrays and linked lists in this project demonstrates the practical
v
Chapter 1: Introduction
1.1 Background
In the modern era of rapid technological advancement, the aviation industry has witnessed
significant growth, necessitating efficient and reliable systems to manage flight reservations.
Traditional manual booking methods are prone to errors, time-consuming, and lack real-time
data processing capabilities. To address these challenges, computerized reservation systems
have become integral, streamlining operations and enhancing customer satisfaction.
The Flight Reservation System developed in this project aims to simulate the core
functionalities of an airline booking platform. By leveraging the C programming language,
known for its efficiency and control over system resources, the project provides a
foundational understanding of how such systems operate. The use of arrays facilitates the
management of a fixed set of flights, while linked lists allow dynamic handling of passenger
information, reflecting real-world scenarios where the number of passengers can vary.
1.2 Objectives
To design and implement a flight reservation system using the C programming language.
To employ linked lists for dynamic management of passenger details associated with
each flight.
vi
Flight Management: Viewing available flights along with their details such as flight
number, origin, destination, and seat availability.
Booking Functionality: Allowing users to reserve seats on selected flights, ensuring that
bookings are made only if seats are available.
Airline Reservation Systems (ARS) have undergone significant transformations since their
inception. Initially, reservations were managed manually, requiring passengers to visit
airline offices or contact agents to book flights. This process was time-consuming and prone
to errors.
The advent of Computer Reservation Systems (CRS) in the 1960s marked a pivotal shift.
Systems like SABRE, developed by American Airlines and IBM, and Galileo, introduced
by United Airlines, automated the booking process, enabling real-time access to flight
schedules, seat availability, and fare information . These systems streamlined operations and
improved efficiency but were primarily accessible to airline staff and travel agents.
Limited Passenger Autonomy: Early systems did not allow passengers to select seats or
print boarding passes independently, necessitating assistance from airline staff .
Lack of Real-Time Updates: Passengers were often not notified promptly about flight
cancellations or delays, leading to inconvenience and dissatisfaction.
vii
Data Silos: Traditional systems operated in isolation, making it challenging to share
information across different airlines or platforms.
Artificial Intelligence (AI): AI-driven analytics enable predictive modeling for demand
forecasting, dynamic pricing, and personalized recommendations, enhancing operational
efficiency and customer satisfaction .
This literature survey highlights the progression from manual reservation methods to
sophisticated, technology-driven systems. Understanding these developments provides a
foundation for designing and implementing an efficient, user-friendly Flight Reservation
System using arrays for flight management and linked lists for passenger details.
3.1 Introduction
viii
3.2Objectives of Requirement Analysis
Stakeholder Alignment: To ensure that the system's requirements align with the
expectations of all stakeholders, including users, administrators, and developers.
Foundation for Design: To provide a solid foundation for system design, development,
and testing phases.
To effectively gather requirements for the Flight Reservation System, the following
techniques are employed:
Functional requirements define the specific behaviors and functions of the system:
Flight Management: The system shall allow administrators to add, update, and delete
flight information.
Passenger Management: The system shall enable booking, updating, and canceling
passenger reservations.
Seat Allocation: The system shall automatically allocate seats to passengers based on
availability.
ix
Search Functionality: The system shall provide search capabilities for flights based on
criteria such as destination, date, and flight number.
Performance: The system shall process booking and cancellation requests within 2
seconds.
Usability: The system shall have an intuitive user interface that is easy to navigate.
Reliability: The system shall have a downtime of less than 1% per month.
Data Structures: Arrays shall be used for managing flight information, and linked lists
shall be used for managing passenger details.
3.7 Assumptions
Each flight has a maximum capacity that will not change dynamically.
User authentication and payment processing are beyond the scope of this project.
Requirements are prioritized based on their importance and impact on the system:
High Priority: Flight management, passenger booking and cancellation, seat allocation.
x
Chapter 4: Software Design
4.1 Introduction
Modularity: Divide the system into distinct modules for flight management, passenger
handling, and user interaction.
Efficiency: Utilize appropriate data structures (arrays and linked lists) to optimize data
storage and retrieval.
Maintainability: Ensure the system is easy to update and extend with new features.
User Interface Module: Handles user interactions, displaying menus, and capturing
input.
Passenger Management Module: Handles passenger data using linked lists, facilitating
booking, cancellation, and listing of passengers.
Data Persistence Module: Manages reading from and writing to files to preserve data
across sessions.
A singly linked list is used for each flight to manage passenger information. Each node contains:
Functionality: Displays menus, captures user input, and directs control flow based on
user choices.
Functionality: Allows administrators to add new flights, update existing flight details,
and view all flights.
Design Considerations: Ensure seat availability before booking and maintain the
integrity of the linked list during insertions and deletions.
xii
4.5.4 Data Persistence Module
Functionality: Reads flight and passenger data from files during system startup and
writes data back to files upon exit.
Design Considerations: Handle file I/O errors gracefully and ensure data consistency.
The system features a console-based interface with clear prompts and menus. Users can navigate
through options using numeric choices, facilitating straightforward interaction without the need
for advanced technical knowledge.
While the system is designed for educational purposes and does not handle sensitive data, basic
security measures include:
Input Validation: Prevent invalid or malicious input that could disrupt system
operations.
Data Integrity: Ensure that data read from and written to files is accurate and
uncorrupted.
Graphical User Interface (GUI): Developing a GUI for enhanced user experience.
Database Integration: Replacing file-based storage with a relational database for better
data management.
Advanced Search and Filtering: Allowing users to search for flights based on various
criteria.
xiii
Chapter 5: Proposed System
Overview
The proposed Flight Reservation System is a console-based application developed in the
C programming language. It aims to streamline the process of booking, canceling, and
managing flight reservations. By leveraging arrays for flight management and linked lists
for passenger details, the system ensures efficient data handling and scalability.
Objectives
Enhance User Experience: Provide a user-friendly interface for both administrators and
passengers to interact with the system seamlessly.
Efficient Data Management: Utilize appropriate data structures to manage flights and
passenger information effectively.
Maintainability: Ensure the system is modular, allowing for easy updates and integration
of additional features in the future.
Key Features
1. Flight Management:
o Add, update, and delete flight details.
o Display available flights with pertinent information such as flight number, origin,
destination, departure time, and available seats.
2. Passenger Management:
o Book tickets for passengers, assigning them to specific flights.
o Cancel existing reservations.
o View passenger lists for specific flights.
3. Search Functionality:
o Search for flights based on criteria such as origin, destination, and date.
4. Data Persistence:
o Store flight and passenger data in files to maintain information across sessions.
System Architecture
The system adopts a modular architecture comprising the following components:
User Interface Module: Handles user interactions, displaying menus, and capturing
input.
Passenger Management Module: Handles passenger data using linked lists, facilitating
booking, cancellation, and listing of passengers.
xiv
Data Persistence Module: Manages reading from and writing to files to preserve data
across sessions.
Data Structures
Flights: An array of structures, each representing a flight with attributes like flight
number, origin, destination, departure time, and available seats.
Passengers: A linked list where each node contains passenger details such as name,
passport number, seat number, and a pointer to the next node.
Enhanced Accessibility: Allows users to make reservations and access flight information
without the need to visit airline offices physically.
Data Integrity: Ensures consistent and accurate data management through structured
storage and retrieval mechanisms.
Future Enhancements
Graphical User Interface (GUI): Developing a GUI for enhanced user experience.
Database Integration: Replacing file-based storage with a relational database for better
data management.
Advanced Search and Filtering: Allowing users to search for flights based on various
criteria.
xv
Chapter 6: Source Code
void displayFlights() {
printf("\nAvailable Flights:\n");
printf("Fli#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_FLIGHTS 5
#define MAX_NAME_LEN 50
#define MAX_PASSPORT_LEN 20
// Passenger structure
char name[MAX_NAME_LEN];
char passport[MAX_PASSPORT_LEN];
} Passenger;
// Flight structure
typedef struct {
int flightNumber;
char origin[30];
char destination[30];
int totalSeats;
int availableSeats;
xvi
Passenger* passengerList;
} Flight;
Flight flights[MAX_FLIGHTS];
void initializeFlights() {
flights[i].flightNumber = 100 + i;
flights[i].totalSeats = 50;
flights[i].availableSeats = 50;
flights[i].passengerList = NULL;
printf("%d\t\t%s\t\t%s\t\t%d\n",
flights[i].flightNumber,
flights[i].origin,
flights[i].destination,
flights[i].availableSeats);
xvii
// Function to find a flight by flight number
if (flights[i].flightNumber == flightNumber) {
return i;
return -1;
void bookSeat() {
int flightNumber;
char name[MAX_NAME_LEN];
char passport[MAX_PASSPORT_LEN];
scanf("%d", &flightNumber);
if (index == -1) {
return;
xviii
if (flights[index].availableSeats == 0) {
return;
scanf("%s", name);
scanf("%s", passport);
strcpy(newPassenger->name, name);
strcpy(newPassenger->passport, passport);
newPassenger->next = flights[index].passengerList;
flights[index].passengerList = newPassenger;
flights[index].availableSeats--;
void cancelReservation() {
int flightNumber;
char passport[MAX_PASSPORT_LEN];
xix
printf("\nEnter Flight Number: ");
scanf("%d", &flightNumber);
if (index == -1) {
return;
scanf("%s", passport);
if (strcmp(current->passport, passport) == 0) {
if (previous == NULL) {
flights[index].passengerList = current->next;
} else {
previous->next = current->next;
free(current);
flights[index].availableSeats++;
xx
return;
previous = current;
current = current->next;
void displayPassengers() {
int flightNumber;
scanf("%d", &flightNumber);
if (index == -1) {
return;
if (current == NULL) {
return;
xxi
}
current = current->next;
// Main function
int main() {
int choice;
initializeFlights();
do {
printf("5. Exit\n");
scanf("%d", &choice);
switch (choice) {
case 1:
xxii
displayFlights();
break;
case 2:
bookSeat();
break;
case 3:
cancelReservation();
break;
case 4:
displayPassengers();
break;
case 5:
break;
default:
return 0;
xxiii
Chapter 7: Output
8.1 Conclusion
The Flight Reservation System developed using the C programming language successfully
demonstrates the fundamental concepts of data structures and file handling. By employing
arrays for managing flight information and linked lists for passenger details, the system
provides a basic yet functional platform for booking, canceling, and viewing flight
reservations.
Efficient Data Management: Utilization of arrays and linked lists ensures organized
storage and retrieval of flight and passenger data.
xxiv
This project serves as a foundational model for understanding the core principles of
reservation systems and can be a stepping stone for more complex applications.
While the current system meets basic requirements, several enhancements can be considered
to improve functionality, scalability, and user experience:
1. Graphical User Interface (GUI): Developing a GUI using libraries such as GTK or Qt
can make the system more intuitive and visually appealing.
5. Mobile Application Development: Creating mobile applications for Android and iOS
platforms can increase accessibility and convenience for users.
7. Advanced Search and Filtering: Enhancing search capabilities to include filters such as
price range, flight duration, and airlines can help users find suitable flights more
efficiently.
8. Integration with Ancillary Services: Offering additional services like hotel bookings,
car rentals, and travel insurance can provide a comprehensive travel solution.
9. Feedback and Rating System: Allowing users to provide feedback and rate their
experiences can help in continuous improvement of the system.
xxv
10. Scalability and Load Balancing: Implementing microservices architecture and load
balancing techniques can prepare the system to handle increased user traffic and ensure
high availability.
By addressing these areas, the Flight Reservation System can evolve into a robust, secure,
and user-centric platform, meeting the dynamic needs of the modern travel industry.
Chapter 8: References
This project was developed using knowledge gained from books and Trainer sir
MR.Sivanraj . Online resource such as youube were helpful for understanding concepts of
Arrays,Structures,Linked Lists in C.The program was compiled by using GDB online
compiler .
xxvi