When it comes to drawing use case diagrams one area many struggles with is showing various relationships in use case diagrams. In fact many tend to confuse <<extend>>, <<include>> and generalization. This article will look into various use case diagram relationships in detail and explain them using examples. To get a deeper understanding of use cases, check out our use case diagram tutorial. If you want to draw them while learning you can use our tool to create use case diagrams. Show
There can be 5 relationship types in a use case diagram.
Let’s take a look at these relationships in detail. Association Between Actor and Use CaseThis one is straightforward and present in every use case diagram. Few things to note.
Different ways association relationship appears in use case diagrams Check out the use case diagram guidelines for other things to consider when adding an actor. Generalization of an ActorGeneralization of an actor means that one actor can inherit the role of the other actor. The descendant inherits all the use cases of the ancestor. The descendant has one or more use cases that are specific to that role. Let’s expand the previous use case diagram to show the generalization of an actor. A generalized actor in an use case diagram Extend Relationship Between Two Use CasesMany people confuse the extend relationship in use cases. As the name implies it extends the base use case and adds more functionality to the system. Here are a few things to consider when using the <<extend>> relationship.
Lets expand our current example to show the <<extend>> relationship. Extend relationship in use case diagrams Although extending use case is optional most of the time it is not a must. An extending use case can have non-optional behavior as well. This mostly happens when your modeling complex behaviors. For example, in an accounting system, one use case might be “Add Account Ledger Entry”. This might have extending use cases “Add Tax Ledger Entry” and “Add Payment Ledger Entry”. These are not optional but depend on the account ledger entry. Also, they have their own specific behavior to be modeled as a separate use case. Include Relationship Between Two Use CasesInclude relationship show that the behavior of the included use case is part of the including (base) use case. The main reason for this is to reuse common actions across multiple use cases. In some situations, this is done to simplify complex behaviors. Few things to consider when using the <<include>> relationship.
Lest expand our banking system use case diagram to show include relationships as well. Includes is usually used to model common behavior For some further reading regarding the difference between extend and include relationships in use case diagrams check this StackOverflow link. Generalization of a Use CaseThis is similar to the generalization of an actor. The behavior of the ancestor is inherited by the descendant. This is used when there is common behavior between two use cases and also specialized behavior specific to each use case. For example, in the previous banking example, there might be a use case called “Pay Bills”. This can be generalized to “Pay by Credit Card”, “Pay by Bank Balance” etc. I hope you found this article about use case relationships helpful and useful. You can use our diagramming tool to easily create use case diagrams online. As always if you have any questions don’t hesitate to ask them in the comments section. What is the function of use case?A use case is a written description of how users will perform tasks on your website. It outlines, from a user's point of view, a system's behavior as it responds to a request. Each use case is represented as a sequence of simple steps, beginning with a user's goal and ending when that goal is fulfilled.
Are use case is an interaction between users and?A Use Case Model describes the proposed functionality of a new system. A Use Case represents a discrete unit of interaction between a user (human or machine) and the system. This interaction is a single unit of meaningful work, such as Create Account or View Account Details.
How are interactions between the system and the user represented in a use case diagram?Actors. A use case diagram shows the interaction between the system and entities external to the system. These external entities are referred to as actors. Actors represent roles which may include human users, external hardware or other systems.
What are the 4 main components of a use case diagram?UCDs have only 4 major elements: The actors that the system you are describing interacts with, the system itself, the use cases, or services, that the system knows how to perform, and the lines that represent relationships between these elements.
|