What is Use Case Diagram?

Tharsini Karunanithy
Javarevisited
Published in
5 min readMay 1, 2023

In this article, I’m going to discuss about Use Case Diagram.

A Use Case Diagram is a type of UML (Unified Modeling Language) diagram that is used to describe the behavior of a system or application from the perspective of its users or actors.

Use Case Diagrams are used to visualize and describe the functional requirements of a system, and are often used in the early stages of software development to help identify the features and functionalities that the system needs to have. They can also be used to communicate the system’s requirements to stakeholders, such as clients and developers, in a clear and concise way.

Purpose of Use Case Diagram

1. Specify the context of a system
2. Capture the requirments of a system
3. Validate system architecture
4. Drive implementation and generate test cases

Use Case Diagram at a Glance

A standard form of use case diagram is defined in the Unified Modeling Language as shown in the Use Case Diagram example below:

Notations

Actor
An actor represents a role that interacts with the system being modeled.
An actor can be a person, another system, or an external entity that interacts with the system.
The actor is shown as a stick figure, and is typically named according to the role they play in the system.

Use Case
A use case represents a specific functionality or action that the system performs in response to an actor’s interaction.
Use cases are represented as ovals and are typically named according to the specific task they represent.
Use cases are used to describe the system’s behavior from the perspective of its users or actors. They define the steps or actions that a user takes to achieve a specific goal or objective, as well as the system’s response to those actions.

Communication Link
a communication link is a line that connects an actor to a use case or connects two use cases to indicate a relationship between them.
Communication links are used to show the interactions and dependencies between actors and use cases within the system being modeled.

Boundary of System

The boundary of the system represents the line that separates the system being modeled from its external environment. The boundary defines what is inside the system and what is outside of it, and helps to identify the actors, use cases, and other components that are part of the system.
The boundary of the system is represented by a rectangle or other shape that encloses the actors and use cases within the system. The actors are typically shown outside the boundary, while the use cases are shown inside the boundary.

Structuring Use Case Diagram with Relationships

Relationships can be used to structure and organize the diagram and to show how the different use cases and actors are related to each other. There are several types of relationships that can be used in a Use Case Diagram, including:

Association: This relationship is used to show that an actor interacts with a particular use case. The association is represented by a line connecting the actor to the use case.

Generalization: This relationship is used to show that one use case is a more specific version of another use case. The more specific use case is represented as a child of the more general use case, with a solid line connecting them.

Include: This relationship is used to show that one use case includes another use case as a sub-step or component. The included use case is represented as a smaller oval within the larger use case, with a dashed line connecting them.

Extend: This relationship is used to show that one use case can be extended by another use case under certain conditions. The extending use case is represented as a smaller oval above the larger use case, with a dashed line connecting them and a condition label indicating when the extension occurs.

We will see one example for all four relationships.

Use case Diagram (Example)

1.Customer uses bank ATM to Check Balances of his/her bank accounts, Deposit Funds, Withdraw Cash and/or Transfer Funds.
ATM Technician provides Maintenance and Repairs.
All these use cases also involve Bank actor whether it is related to customer transactions or to the ATM servicing.

2.”View Items” requires two external processes, both an “Authentication” process and an “Identity Provider“ process.
“Checkout” requires three external processes, an “Authentication” process, an “Identity Provider“ process, and a “Paypal” process.
“Client Register” requires the “Authentication” process.

Hope this helps. Share your thoughts too!

--

--