Class Diagram
Class diagram modeling the components of an airline booking system, including passengers, flights, and bookings.
This class diagram models the components of an airline booking system. It's an interesting example because it involves entities with specific states and complex associations, like seats on a particular flight.
passengerId, name, and contact information.flightNumber, departureTime, and arrivalTime. It's an instance of a FlightDescription.serialNumber and model. It has a collection of Seats.seatNumber (e.g., "21A") and class (e.g., Economy).Passenger for a specific Seat on a specific Flight. It has a bookingId and a status (e.g., Confirmed, Cancelled).Booking is made by one Passenger (One-to-One Association).Booking reserves one Seat on one Flight.Flight is operated by one Airplane (One-to-One Association).Airplane is composed of many Seats (Composition).Flights can follow the same FlightDescription.