Knowledge Guide
HomeOO & Low-Level DesignOO Design Problems

Design an Airline Management System

An Airline Management System is a managerial software which targets to control all operations of an airline. Airlines provide transport services for their passengers. They carry or hire aircraft for this purpose. All operations of an airline company are controlled by their airline management system.

This system involves the scheduling of flights, air ticket reservations, flight cancellations, customer support, and staff management. Daily flights updates can also be retrieved by using the system.

Image
Image

System Requirements

We will focus on the following set of requirements while designing the Airline Management System:

  1. Customers should be able to search for flights for a given date and source/destination airport.

  2. Customers should be able to reserve a ticket for any scheduled flight. Customers can also build a multi-flight itinerary.

  3. Users of the system can check flight schedules, their departure time, available seats, arrival time, and other flight details.

  4. Customers can make reservations for multiple passengers under one itinerary.

  5. Only the admin of the system can add new aircrafts, flights, and flight schedules. Admin can cancel any pre-scheduled flight (all stakeholders will be notified).

  6. Customers can cancel their reservation and itinerary.

  7. The system should be able to handle the assignment of pilots and crew members to flights.

  8. The system should be able to handle payments for reservations.

  9. The system should be able to send notifications to customers whenever a reservation is made/modified or there is an update for their flights.

Use case diagram

We have five main Actors in our system:

Here are the top use cases of the Airline Management System:

Image
Image

Class diagram

Here are the main classes of our Airline Management System:

Image
Image
Image
Image

Activity diagrams

Image
Image
Image
Image

Code

Here is the code for major classes.

Enums and Constants: Here are the required enums, data types, and constants:

java
public enum FlightStatus {
    ACTIVE,
    SCHEDULED,
    DELAYED,
    DEPARTED,
    LANDED,
    IN_AIR,
    ARRIVED,
    CANCELLED,
    DIVERTED,
    UNKNOWN
}

public enum PaymentStatus {
    UNPAID,
    PENDING,
    COMPLETED,
    FILLED,
    DECLINED,
    CANCELLED,
    ABANDONED,
    SETTLING,
    SETTLED,
    REFUNDED
}

public enum ReservationStatus {
    REQUESTED,
    PENDING,
    CONFIRMED,
    CHECKED_IN,
    CANCELLED,
    ABANDONED
}

public enum SeatClass {
    ECONOMY,
    ECONOMY_PLUS,
    PREFERRED_ECONOMY,
    BUSINESS,
    FIRST_CLASS
}

public enum SeatType {
    REGULAR,
    ACCESSIBLE,
    EMERGENCY_EXIT,
    EXTRA_LEG_ROOM
}

public enum AccountStatus {
    ACTIVE,
    CLOSED,
    CANCELED,
    BLACKLISTED,
    BLOCKED
}

public class Address {
    private String streetAddress;
    private String city;
    private String state;
    private String zipCode;
    private String country;
}

Account, Person, Customer and Passenger: These classes represent the different people that interact with our system:

java
// For simplicity, we are not defining getter and setter functions. The reader can
// assume that all class attributes are private and accessed through their respective
// public getter method and modified only through their public setter method.

public class Account {
    private String id;
    private String password;
    private AccountStatus status;

    public boolean resetPassword();
}

public abstract class Person {
    private String name;
    private Address address;
    private String email;
    private String phone;

    private Account account;
}

public class Customer extends Person {
    private String frequentFlyerNumber;

    public List<Itinerary> getItineraries();
}

public class Passenger {
    private String name;
    private String passportNumber;
    private Date dateOfBirth;

    public String getPassportNumber() {
        return this.passportNumber;
    }
}

Airport, Aircraft, Seat and FlightSeat: These classes represent the top-level classes of the system:

java
public class Airport {
    private String name;
    private Address address;
    private String code;

    public List<Flight> getFlights();
}

public class Aircraft {
    private String name;
    private String model;
    private int manufacturingYear;
    private List<Seat> seats;

    public List<FlightInstance> getFlights();
}

public class Seat {
    private String seatNumber;
    private SeatType type;
    private SeatClass _class;
}

public class FlightSeat extends Seat {
    private double fare;

    public double getFare();
}

Flight Schedule classes, Flight, FlightInstance, FlightReservation, Itinerary: Here are the classes related to flights and reservations:

java
public class WeeklySchedule {
    private int dayOfWeek;
    private Time departureTime;
}

public class CustomSchedule {
    private Date customDate;
    private Time departureTime;
}

public class Flight {
    private String flightNumber;
    private Airport departure;
    private Airport arrival;
    private int durationInMinutes;

    private List<WeeklySchedules> weeklySchedules;
    private List<CustomSchedules> customSchedules;
    private List<FlightInstance> flightInstances;
}

public class FlightInstance {
    private Date departureTime;
    private String gate;
    private FlightStatus status;
    private Aircraft aircraft;

    public bool cancel();

    public void updateStatus(FlightStatus status);
}

public class FlightReservation {
    private String reservationNumber;
    private FlightInstance flight;
    private Map<Passenger, FlightSeat> seatMap;
    private Date creationDate;
    private ReservationStatus status;

    public static FlightReservation fetchReservationDetails(String reservationNumber);

    public List<Passenger> getPassengers();
}

public class Itinerary {
    private String customerId;
    private Airport startingAirport;
    private Airport finalAirport;
    private Date creationDate;
    private List<FlightReservation> reservations;

    public List<FlightReservation> getReservations();

    public boolean makeReservation();

    public boolean makePayment();
}
🤖 Don't fully get this? Learn it with Claude

Stuck on Design an Airline Management System? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **Design an Airline Management System** (OO & Low-Level Design) and want to truly understand it. Explain Design an Airline Management System from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **Design an Airline Management System** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **Design an Airline Management System** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **Design an Airline Management System** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes