Sequence Diagram for the Airline Management System
Create a sequence diagram for reserving a flight in the airline management system and solve a challenge.
We'll cover the following
Sequence diagrams are a great way to understand the interactions between different entities and objects in the system. There can be different sequence diagrams that we can create for our airline management system. In this lesson, we will create sequence diagrams for the following two interactions:
Reserve a flight: The customer reserves a flight online.
Sequence challenge: The customer cancels a reservation.
Reserve a flight
The sequence diagram for reserving a flight should have the following actors and objects that will interact with each other:
Actor:
Customer
Objects:
SearchCatalog
,FlightReservation
,FlightSeat
, andPayment
System
Here’re the steps in the reserve flight interaction:
The customer searches for flights flying from an airport on a particular date.
The catalog returns a list of flights that satisfy the search query.
The customer selects a flight.
If seats are available:
The system requests the customer to select seats.
The customer selects a seat.
The system requests to add passenger details.
The customer adds passenger details.
The system creates a reservation for the customer.
Payment is requested against the reservation.
The customer initiates a transaction, and the payment is processed.
If the payment is successful:
The customer and system are informed that the payment is successful.
The system updates the seat status to booked.
The system updates the reservation status to confirmed.
The reservation details are sent to the customer.
Else, if the payment is unsuccessful:
The customer is informed that the payment has failed.
Else, if seats are unavailable:
The customer is informed that no seats are available.
Note: We assume that the customer performs a valid search that will result in a list of flights.
Based on the order above, the sequence diagram for reserving a flight in the airline management system is given below.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.