Table of contents
1.
Introduction
2.
System Requirements
2.1.
Functional Requirements
2.1.1.
What are functional requirements?
2.1.2.
Functional Requirements for an Airline Management System
2.2.
Non-Functional Requirements
2.2.1.
What are nonfunctional requirements?
2.2.2.
Non-Functional Requirements for an Airline Management System
3.
Class Diagram
3.1.
What are class diagrams?
4.
Use Case Diagram
5.
Code in C++
5.1.
Code Output
5.2.
Code Explanation
6.
Frequently Asked Questions
6.1.
What are the challenges of having the entire application code (Front end, back end and data storage layer) as a single codebase?
6.2.
Why are monolithic systems known as centralised systems?
6.3.
What can cause a partition in a distributed system?
7.
Conclusion
Last Updated: Mar 27, 2024
Medium

Design an Airline Management System - Low Level Design

Author Suraj Pandey
1 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

The Airline Management System is a software that makes the daily operations of airlines more efficient and convenient for customers. Examples of these systems include Sabre Airline Solutions, Amadeus IT Group, and Travelport.

The Airline Management system covers everything from booking flights and managing customer data to tracking flight schedules and updates. By providing a comprehensive solution for the airline industry, these systems aim to streamline processes, improve efficiency, and enhance the customer experience.

The low-level design of the Airline Management System includes functional and non-functional requirements, data structures, algorithms, and interfaces. This blueprint serves as a guide for the development and implementation of the system.

illustrative image

System Requirements

Collecting the functional and non-functional requirements of an Airline Management System lays the foundation for designing the system.

Functional Requirements

What are functional requirements?

Functional requirements are the specific tasks or functions that a system must be able to perform. They describe what a system should do and what it should be able to accomplish.

Functional Requirements for an Airline Management System

The following requirements are considered as functional requirements for an Airline Management System:

  1. Class Flight: This class stores flight information such as flight number, departure city, arrival city, departure time, arrival time, flight status, and available seats. The class provides accessor functions to retrieve each piece of information.
     
  2. Class Passenger: This class stores information about a passenger, such as name, booking status, and seat number. The class provides accessor functions to retrieve each piece of information.
     
  3. Class Booking: This class stores information about a booking, such as booking number, passenger information, flight information, and payment details. The class provides accessor functions to retrieve each piece of information.
     
  4. Class Staff: This class stores information about a staff member, such as name and staff ID. The class provides accessor functions to retrieve each piece of information.
     
  5. Main Function: The main function creates objects of the classes and retrieves information about flight, passenger, booking, and staff using accessor functions. The retrieved information is displayed on the console.

Non-Functional Requirements

What are nonfunctional requirements?

Non-functional requirements are the requirements that specify the quality and performance characteristics of a system. They describe how the system should behave and how well it should perform.

Non-Functional Requirements for an Airline Management System

The following requirements are considered nonfunctional requirements for an Airline Management System: 

  1. Scalability: The system should handle an increase in the number of flights, customers, and transactions.
     
  2. Reliability: The system should be highly reliable and available to customers 24/7.
     
  3. Performance: The system should be able to provide real-time information and respond to customer requests.
     
  4. Security: The system should ensure customer information and transactions' confidentiality, integrity, and availability.
     
  5. User-Friendliness: The system should have a user-friendly interface that is easy to use and navigate.
     
  6. Interoperability: The system should be able to integrate with other systems and technologies the airline uses.

Class Diagram

What are class diagrams?

A class diagram is a type of diagram used in object-oriented programming to represent the structure of a system by showing the relationships between classes, interfaces, and objects.

For a complete overview of class diagrams, including their definition and creation process, please refer to this article for more information.

Class Diagram of Airline Management System

Use Case Diagram

A use case diagram is a type of UML diagram that describes the interaction between a system and its users or external systems. It provides a high-level view of a system's functionalities and the different types of users or external systems that interact with it. Use case diagrams are typically used to identify, analyze, and document the requirements of a system from the perspective of its users or stakeholders.

Use Case Diagram of Airline Management System

In this diagram, there are two actors: User and Booking Staff. The User interacts with the Flight Booking System to Search for flights, Reserve seats, Cancel Reservations and View Reservations. The Booking Staff interacts with the Flight Booking System to View Flight Information, Modify Flight Status, Add/Update Flight Details, and Create/View Staff Account.

Code in C++

#include <iostream>
#include <string>

using namespace std;

// Flight class
class Flight {
    private:
        string flightNumber;
        string departureCity;
        string arrivalCity;
        string departureTime;
        string arrivalTime;
        string flightStatus;
        int seatsAvailable;
    public:

        Flight() {
            flightNumber = "";
            departureCity = "";
            arrivalCity = "";
            departureTime = "";
            arrivalTime = "";
            flightStatus = "";
            seatsAvailable = 0;
        }


        Flight(string flightNumber, string departureCity, string arrivalCity,
                string departureTime, string arrivalTime, string flightStatus, int seatsAvailable) {
            this->flightNumber = flightNumber;
            this->departureCity = departureCity;
            this->arrivalCity = arrivalCity;
            this->departureTime = departureTime;
            this->arrivalTime = arrivalTime;
            this->flightStatus = flightStatus;
            this->seatsAvailable = seatsAvailable;
        }

        string getFlightNumber() {
            return flightNumber;
        }

        string getDepartureCity() {
            return departureCity;
        }

        string getArrivalCity() {
            return arrivalCity;
        }

        string getDepartureTime() {
            return departureTime;
        }

        string getArrivalTime() {
            return arrivalTime;
        }

        string getFlightStatus() {
            return flightStatus;
        }

        int getSeatsAvailable() {
            return seatsAvailable;
        }
};

// Passenger class
class Passenger {
    private:
        string name;
        string bookingStatus;
        string seatNumber;
    public:
        Passenger() {}  // Default constructor
        Passenger(string name, string bookingStatus, string seatNumber) {
            this->name = name;
            this->bookingStatus = bookingStatus;
            this->seatNumber = seatNumber;
        }

        string getName() {
            return name;
        }

        string getBookingStatus() {
            return bookingStatus;
        }

        string getSeatNumber() {
            return seatNumber;
        }
};

// Booking class
class Booking {
    private:
        string bookingNumber;
        Passenger passenger;
        Flight flight;
        string paymentDetails;
    public:
        Booking(string bookingNumber, Passenger passenger, Flight flight, string paymentDetails) {
            this->bookingNumber = bookingNumber;
            this->passenger = passenger;
            this->flight = flight;
            this->paymentDetails = paymentDetails;
        }

        string getBookingNumber() {
            return bookingNumber;
        }

        Passenger getPassenger() {
            return passenger;
        }

        Flight getFlight() {
            return flight;
        }

        string getPaymentDetails() {
            return paymentDetails;
        }
};

// Staff class
class Staff {
    private:
        string name;
        string staffID;
    public:
        Staff(string name, string staffID) {
            this->name = name;
            this->staffID = staffID;
        }

        string getName() {
            return name;
        }

        string getStaffID() {
            return staffID;
        }
};

int main() {
    // Creating objects of classes
    Flight flight("AI101", "Delhi", "London", "10:00", "15:00", "On-time", 200);
    Passenger passenger("John Doe", "Confirmed", "A1");
    Booking booking("B001", passenger, flight, "Credit Card");
    Staff staff("Jane Doe", "S001");

    // Accessing class data through objects
    cout << "Flight Number: " << flight.getFlightNumber() << endl;
    cout << "Departure City: " << flight.getDepartureCity() << endl;
    cout << "Arrival City: " << flight.getArrivalCity() << endl;
    cout << "Departure Time: " << flight.getDepartureTime() << endl;
    cout << "Arrival Time: " << flight.getArrivalTime() << endl;
    cout << "Flight Status: " << flight.getFlightStatus() << endl;
    cout << "Seats Available: " << flight.getSeatsAvailable() << endl;
    cout << endl;

    cout << "Passenger Name: " << passenger.getName() << endl;
    cout << "Booking Status: " << passenger.getBookingStatus() << endl;
    cout << "Seat Number: " << passenger.getSeatNumber() << endl;
    cout << endl;

    cout << "Booking Number: " << booking.getBookingNumber() << endl;
    cout << "Passenger Name: " << booking.getPassenger().getName() << endl;
    cout << "Flight Number: " << booking.getFlight().getFlightNumber() << endl;
    cout << "Payment Details: " << booking.getPaymentDetails() << endl;
    cout << endl;

    cout << "Staff Name: " << staff.getName() << endl;
    cout << "Staff ID: " << staff.getStaffID() << endl;
    cout << endl;

    return 0;

}
You can also try this code with Online C++ Compiler
Run Code

Code Output

Flight Number: AI101
Departure City: Delhi
Arrival City: London
Departure Time: 10:00
Arrival Time: 15:00
Flight Status: On-time
Seats Available: 200

Passenger Name: John Doe
Booking Status: Confirmed
Seat Number: A1

Booking Number: B001
Passenger Name: John Doe
Flight Number: AI101
Payment Details: Credit Card

Staff Name: Jane Doe
Staff ID: S001
You can also try this code with Online C++ Compiler
Run Code

Code Explanation

This Airline Management System code defines several classes in C++ to model a flight reservation system:

  • Flight Class: stores information about a flight such as flight number, departure city, arrival city, departure time, arrival time, flight status, and seats available.
     
  • Passenger Class: stores information about a passenger, such as name, booking status, and seat number.
     
  • Booking Class: stores information about a booking, such as booking number, passenger information, flight information, and payment details.
     
  • Staff Class: stores information about a staff member, such as name and staff ID.
     

The main() function creates objects of each class and accesses their data using class methods to print it to the console.

Frequently Asked Questions

What are the challenges of having the entire application code (Front end, back end and data storage layer) as a single codebase?

Having a single codebase for the entire application (monolithic architecture) can lead to:

Complexity and difficulty maintaining and understanding the code,

Deployment difficulties.

Scalability issues and bottlenecking.

Lack of modularity and difficulty with testing and implementing new technologies.

Lack of flexibility and difficulty with DevOps practices.

A microservices architecture can help overcome these challenges by separating components into independent units that can be developed, deployed, and scaled independently.

Why are monolithic systems known as centralised systems?

Monolithic systems are considered centralized because all application components are integrated into a single codebase, and all requests are processed through a single entry point. This centralization can simplify management but can also result in limitations in scalability and increased risk of failure.

What can cause a partition in a distributed system?

Network failures, hardware failures, software failures, load balancing issues, configuration errors, resource depletion, or intentional partitioning can cause a partition in a distributed system. It is important for a distributed system to handle and recover from partitions to ensure availability and reliability.

Conclusion

In conclusion, we have implemented a simple flight booking system using object-oriented programming concepts in C++. The system includes four classes - Flight, Passenger, Booking, and Staff - that store important information about the flight, passengers, bookings, and staff members.

Each class has its own attributes and functions to access and manipulate the data. The program's main function demonstrates how to use these classes and access their stored information. The output shows the various attributes of the flight, passenger, booking, and staff objects.

This system aims to help airlines manage their operations and make processes more efficient. It is designed to provide a comprehensive solution for the airline industry. It has requirements like handling more flights, customers, and transactions, reliability, good performance, security, and user-friendly interface.

We've taken a big step in understanding the low-level design of an Airline Management System. We're ready to tackle more challenging system design problems, which are frequently asked in product-based companies. 

To keep growing your skills, check out our System Design Guided path. It provides all the information you need to get started with system design. You can also consider our System Design Course to give your career an edge over others.

We're glad you found this blog helpful. Don't hesitate to share your thoughts and feedback in the comments section.

 

Live masterclass