Imagine you’ve been asked to design a new software system—say, an online food delivery app. Before you dive into writing classes, functions, or database schemas, the first question is:
"What exactly should this system do?"
You need to understand the problem from the user’s point of view.
That’s where Use Case Diagrams come in.
In this article, we will explore:
A Use Case Diagram is a visual representation of how different users (also called actors) interact with a system.
It’s like a bird’s-eye view of the system’s functionality without getting into any code.
At its core, a use case diagram answers one key question:
"What can users do with this system?"
Use Case Diagrams do not explain how a feature is implemented. They only show:
Use Case Diagrams are typically used in the early phases of software development—right after the requirements are gathered and before detailed design begins.
Let’s say you’re building a ride-booking system.
Your Use Case Diagram might include:
Actors: Rider, Driver
Use Cases:
A use case diagram might look simple on the surface, just stick figures, ovals, and arrows, but each element has a specific purpose and meaning.
To read, interpret, or create a use case diagram, you need to understand its four key building blocks:
Let’s explore each of them in detail.
An actor represents anything that interacts with the system from outside. Most often, actors are people (users), but they can also be external systems, sensors, or services.
Notation: Stick figure labeled with the actor’s role.
There are two types of actors:
A use case is a functionality or goal that the system provides to the actor. Think of it as an action the user wants to perform.
Notation: Oval with the name of the use case inside.
Each use case should:
The system boundary defines what’s inside the system and what’s outside. This helps clearly define scope.
Examples: "Library Management System", "Online Banking System"
Anything inside the box is part of your system. Anything outside is not your responsibility.
Notation: A labeled box that encloses al the use cases
Relationships describe how actors and use cases are connected or how different use cases relate to one another. There are four main types:
Customer → Place Order
Notation: Represented by a solid line
Checkout
includes Validate Payment
Notation: Dashed arrow with label <<include>>
Search
can extend to Advanced Filter
Notation: Dashed arrow with label <<extend>>
Admin
is a specialized User
Notation: Directed arrow with a triangle arrowhead from child to parent
Let’s walk through the process of drawing a use case diagram step by step.
To make it more relatable, we’ll build a use case diagram for a Movie Ticket Booking System as we go along.
Start by identifying who will interact with your system. These could be:
For our example:
Now, list out what the actors want to do. These are your use cases, the actions or goals the system should support.
Tips:
For the movie booking system:
Draw a box around all the use cases. This box represents your system and visually defines the scope of your system.
Anything inside the box is your responsibility to implement. Anything outside is external.
Draw a rectangle and label it with the name of your system.
For our example: Movie Ticket Booking System
Now, link each actor to the relevant use cases using solid lines (associations).
Use arrows and labels to show the relationships among use cases.
This means a use case always includes another use case.
It helps you:
Example: Whenever someone books a ticket, they must make a payment.
Used when a use case has optional or conditional behavior.
Example: While browsing movies, the user might choose to filter by genre—but it's not mandatory.
Use when actors or use cases share common behavior but differ slightly.
Example: A Registered User
and Guest User
both act like a Customer
, but with slight differences. Use generalization to reflect that.