Use Case Diagram
Purpose of the Use Case Diagram
The use case diagram is our functional overview — it shows WHO interacts with the system and WHAT they can do. Before we dive into the structural details (class diagram) or runtime behavior (sequence diagram), we need to answer two questions:
- Who are the actors? — Which external entities interact with the booking system?
- What are the use cases? — What goals can each actor achieve?
For the Movie Ticket Booking System, the use case diagram reveals that three distinct actors exist — not just the obvious "Customer" and "Admin," but also a System Timer that automates seat-hold expiration. This third actor is easy to miss and critical for the design.
This diagram traces directly to our requirements: R1-R4 (Admin manages movies/theatres/shows), R5-R10 (Customer books tickets), and R6 (System Timer expires holds). The Actor-Use Case mapping will guide which classes need which methods.
Identifying Actors
An actor is any external entity that interacts with the system. Let's derive actors from our requirements:
Actor 1: Customer (Primary)
- Derived from: R5, R6, R7, R8, R9, R13
- Role: A registered user who searches for movies, selects seats, makes payment, and manages their bookings
- Interacts via: Search, browse, select, pay, cancel
- This is the primary actor — the system exists to serve customers
Actor 2: Admin
- Derived from: R1, R2, R3, R4
- Role: A theatre operator who manages movies, theatres, screens, shows, and seat configurations
- Interacts via: Add/update/remove movies, configure screens, schedule shows
- This is a supporting actor — they configure the system that customers use
Actor 3: System Timer (Automated)
- Derived from: R6, R10
- Role: An automated agent that monitors seat holds and expires them when the timeout period elapses
- Interacts via: expireHold() — triggered by time, not by a human
- This is easy to overlook but essential. Without the System Timer, held seats are never released if a user abandons checkout. In the code, this actor maps to a scheduled task or a timeout callback.
Why not a "Payment Gateway" actor?
You might consider the external payment service as an actor. In a full system design, it would be. But in our LLD scope, we model Payment as an internal class — the gateway integration is abstracted. We don't model the external callback from Stripe or PayPal. If the interviewer asks, mention it as an extension.
Identifying Use Cases
Each use case represents a goal that an actor achieves through the system. Let's group them by actor:
Customer Use Cases:
| # | Use Case | Requirement | Description |
|---|---|---|---|
| UC1 | Search Movies | R13 | Find movies by title, genre, language, or city |
| UC2 | Browse Shows | R3, R13 | View available showtimes for a selected movie |
| UC3 | View Seat Map | R5 | See available/held/booked seats for a specific show |
| UC4 | Select Seats | R6 | Choose one or more available seats — triggers temporary hold |
| UC5 | Make Payment | R8 | Pay for the held seats — transitions booking to CONFIRMED |
| UC6 | View Bookings | R7 | View current and past bookings |
| UC7 | Cancel Booking | R9 | Cancel a CONFIRMED booking before the show starts |
Admin Use Cases:
| # | Use Case | Requirement | Description |
|---|---|---|---|
| UC8 | Add/Update Movie | R1 | Create or modify movie information |
| UC9 | Configure Screen | R2, R4 | Set up a screen's seating layout (rows, columns, seat types) |
| UC10 | Schedule Show | R3 | Assign a movie to a screen at a specific date and time |
System Timer Use Cases:
| # | Use Case | Requirement | Description |
|---|---|---|---|
| UC11 | Expire Seat Holds | R6, R10 | Release seats when the hold timer elapses — transitions booking to EXPIRED |
Include and Extend Relationships:
- UC4 (Select Seats) includes UC3 (View Seat Map) — you always view before selecting
- UC5 (Make Payment) includes a price calculation step driven by R11 (pricing strategy)
- UC7 (Cancel Booking) extends UC6 (View Bookings) — cancellation is an optional action from the bookings view
- UC11 (Expire Seat Holds) extends UC4 (Select Seats) — expiration only triggers if payment isn't completed in time
Run the Use Case Diagram
The diagram below is live. Set up tonight's show as the Admin, book seats as the Customer, and let the clock run for the System Timer: each use case lights up when its actor runs it, «include» fires every time, and each «extend» fires only when its condition holds.

Complete Use Case Diagram

Key Design Decisions
1. Why is System Timer a separate actor?
The System Timer is not a human — it's a scheduled process that runs independently. But in UML, any external entity that triggers use cases is an actor. Without the System Timer, our use case diagram would not capture the critical hold-expiration behavior (R6). In the code, this maps to a scheduled task, a timer callback, or a periodic check — but from a use case perspective, it's an actor that triggers UC11.
2. Why didn't we model the Payment Gateway as an actor?
In our LLD scope, payment is handled by an internal Payment class. The external gateway (Stripe, Razorpay) is behind an abstraction. If we were doing system design, it would be an actor. In LLD, it's an implementation detail of Make Payment.
3. Why does Select Seats include View Seat Map?
A user cannot meaningfully select seats without first seeing which seats are available. The include relationship captures this mandatory dependency. In the code, selectSeats() will internally call the availability check that viewSeatMap() also uses.
4. Why 11 use cases (not fewer)?
A common mistake is collapsing use cases too aggressively — e.g., merging "Search Movies" and "Browse Shows" into "Find Movies." But these are distinct goals: searching by title is different from filtering by showtime. Keeping them separate ensures the class diagram has the right granularity.
5. How does this connect to the next diagrams?
The class diagram will provide classes for each use case. The sequence diagram will trace UC4 → UC5 (the booking flow) step by step. The state machine diagram will formalize the booking status transitions that UC4, UC5, UC7 and UC11 trigger. Each subsequent diagram zooms deeper into a specific dimension of this same system.