Navigation
Use Case Diagram
Use Case Diagrams belong to the group of behavioral diagrams in UML (Unified Modeling Language), a standard visual modeling language used to illustrate the design of a system. They are typically used to specify a system’s functionality from the end user’s perspective, depicting the interactions between the user (also known as an “actor”) and the system itself.
Use case diagrams help to ensure that all possible scenarios have been accounted for from the perspective of different types of users, thus playing a crucial role in defining the system’s functional requirements.
This makes them a key tool during the early stages of software development, helping to bridge the gap between the technical developers and the non-technical stakeholders.
On This Page
Origins in UML
Use case diagrams originated as part of the UML (Unified Modeling Language), which Grady Booch, Ivar Jacobson, and James Rumbaugh at Rational Software developed in the 1990s.
The goal of UML was to create a standardized method for visualizing a system’s design, and it has since been adopted widely across the software industry.
Key Use Case Diagram Elements
A typical Use Case Diagram might include several actors and use cases, showing how different types of users interact with various system features. Below are some details about each of these elements:
- Actors: An actor represents a role that a user or another system plays with respect to the system. A single actor can represent many users if they perform the same interactions.
- Use Cases: Use cases represent a specific function or action the system can perform. For example, in a banking system, use cases could be “Make a Deposit,” “Withdraw Money,” or “Check Balance.” Each use case should be a complete flow of events from start to finish.
- Associations: Associations represent the interaction between an actor and a use case. A line between an actor and a use case indicates that the actor will interact with the system to achieve the use case.
- Includes: “Includes” is a relationship in which one use case (the base) uses the functionality of another use case (the inclusion). The “includes” relationship helps to avoid repetition by extracting common parts of the behaviors of several use cases.
- Extends: “Extends” is a relationship where an extension use case adds new behaviors or actions to a base use case. The extension use case will be invoked under certain circumstances when a pre-defined condition is met.
Actors in Use Case Diagrams
Actors in a use case diagram represent the different types of entities interacting with the system being designed. These actors can be human users, other systems, or hardware devices.
They represent diverse roles that interact with the system. For example, in a banking system, actors might include a bank customer, a bank teller, and a banking system.
The diagram represents actors as stick figures, and the lines (associations) between actors and use cases represent the interactions they can have with the system.
Each actor interacts with the system in specific ways, defined by the use cases they are connected to.
Use Cases in Use Case Diagrams
The use cases in a use case diagram represent specific functions or tasks that the system can perform. They encapsulate the particular sequences of interactions between the system and its actors that achieve a meaningful user goal.
Use cases are typically represented as circles or ellipses in the diagram.
A well-defined use case should be goal-oriented and written from the actor’s perspective. Each use case represents a specific sequence of interactions the system performs while interacting with one or more actors, achieving a particular goal.
Associations, Includes and Extends Relationships
Relationships in a use case diagram illustrate how actors and use cases interact. These relationships can be categorized as Associations, Includes, and Extends.
Associations are depicted as lines connecting an actor to a use case, and they illustrate that the actor interacts with the system to achieve the use case.
The “Includes” relationship is used when a use case inherently includes the functionality of another separate use case. This is represented by an arrow with a dotted line connecting the base use case to the included one.
The “Extends” relationship is used when the behavior of a use case can be extended by another use case, typically based on certain conditions. This is represented by an arrow with a dotted line connecting the base use case to the extension use case.
These relationships help show how different parts of a system interact and identify commonalities and differences between other user interactions. They also help keep use case diagrams clear and organized, making them more effective communication tools.
Conclusion
Use Case Diagrams help create a clear picture of the various roles interacting with a system and the tasks they can perform.
These diagrams are useful during system design and planning, helping to ensure that all potential user interactions are considered and planned for.