Sequence Diagram for the Movie Ticket Booking System
Visualize the sequence diagrams for the creation and payment of a booking, and practice the concepts with a challenge.
We'll cover the following
A sequence diagram is 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 movie ticket booking system. In this lesson, we will create sequence diagrams for the following three interactions:
Create a booking: The customer creates a booking for a show.
Payment for the booking: The customer pays for the booking.
Sequence challenge: The customer cancels their booking.
Create a booking
The sequence diagram for creating a booking should have the following actors and objects that will interact with each other:
Actor:
Customer
Objects:
Catalog
,Movie
, andShowTime
System
Here’re the steps of the interaction to create a booking interaction:
The customer searches for a movie from the catalog.
The catalog returns the required movie.
They request show times for the movie they wanted to book.
The available show times for the movie are returned.
The customer requests available seats for the show.
If seats are available:
The customer receives a list of available seats.
The customer books their desired seats using the system.
The seat status is set to book.
The system requests payment against the booked seats from the customer.
Else if the seats are not available:
The customer is informed that no seats are available.
Based on the order above, the sequence diagram for creating a booking in the movie ticket booking system is given below.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.