...

/

Sequence Diagram for the Movie Ticket Booking System

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.

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, ShowTime, and Booking

Here are the steps of the interaction to create a booking:

  1. The customer searches for a movie from the catalog.

  2. The catalog returns the required movie(s).

  3. The customer requests showtimes for the selected movie from the catalog.

  4. The available showtimes for the movie are returned.

  5. The customer requests available seats for the selected showtime.

  6. If seats are available:

    1. The customer receives a list of available seats.

    2. The customer selects their desired seats and requests to create a booking.

    3. The booking is created for the customer, selected seats, and showtime. The booking status is set to “PENDING.”

    4. The customer is notified that the booking is created and payment is required.

  7. Else if no seats are available:

    1. 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.