Grp 9: Actor Generalization, Include and Extend, Template for Use Case Narrative.

Table of contents:

  • Use case Diagram

          • Definition

          • Major Components

          • Types of Relationship used in UCD

  • Generalization

          • What is Generalization??

          • Types of Generalization

  • Actor Generalization

          • What is Actor Generalization??

  • Use Case Generalization

          • What is Use Case Generalization??

  • Extend

  • Include

  • Template for Use Case Narrative

Use Case Diagram

Definition:


Use-Case Diagrams (hereafter referred as UCD) is a high-quality illustration and is designed from the perspective of end users. It can be used to describe system functionality and represents only a positive flow. The illustration is a diagram showing a possible user interaction with a system. The UCD shows the different use cases and different types of users the system has and will often go along with other types of diagrams. The use cases are represented by either ellipses or circles. Actors are generally represented as stick figures.

Components of UCD:


UCD’s have four major components: The Actors, The System, The Use Cases and The Lines. Before diving into the deeper parts of these topics, let us first see their basic definition:

1. Actors: They communicate with the system to perform the task. It is always represented by Noun. Actors should be positioned on outside the system boundary. Actors are of two types:

  • Primary Actors and Secondary Actors:

Primary Actors launches the system to work and System relies on the Secondary Actors for information. Primary Actors should be positioned on the right side of the System boundary and Secondary Actors on the right side of the boundary.

2. Use Cases:

This is used for the various business functions. It should be placed inside the System Boundary and is represented by ellipse or circles.

3. System:

It depicts the system as one and all the use-cases drawn inside this system. It is shown by rectangular box.


4. Lines:

Lines are used for depicting relationships between the elements.


Types of Relationships used in UCD


Usually, 3 types of relationships used in Use Case Diagram: 1. Generalization2. Include3. Extend

Generalization

What is Generalization??


  • It is a kind of relationship.

  • Parent class is not without none of its child class.

  • Direction of the arrow is based on dependency.

Types of Generalization:


Generalization is of two types:

1. Actor Generalization

2. Use Case Generalization

Actor Generalization

What is Actor Generalization??


In simple words, actor generalization is a kind of relationship between the actor. For example, if we generalized Employees into Managers and Workers then it is the example of Actor Generalization.

Looking at use case modeling, actor generalization shows the relationships that exist between two actors, and that one actor (descendant) inherits the roles and properties of another actor (ancestor). It also states that all use cases described for its ancestral actors can be used by its descendant actors. Generalization of actors means that one actor can assume the role of the other. Descendant actors get all the use cases of ancestor actors. Descendant actors have one or more use cases specific to this purpose.

For those of you known with OOP concepts: UML actors are classes and the generalization relationship is the inheritance relationship between two actors by the virtue of which one actor takes all the attributes and relationships of the other actor.


Example 1:

When traveling by air, both "business travelers" and "tourists" are "passengers." As they are passengers allows them to take similar actions such as "buying tickets", yet they are separate actors permits them to make a difference as well. Means "Business travelers" may be able to "redeem business miles", but "tourists" may not.


Example 2:

Another situation commonly encountered in many systems is that the system administrator, who has added functionality, is actually one of the ordinary users. So let's say the system is an accounting system with the main agent being "Accountant" and with another agent called "Administrator". In our situations, the administrator should be able to perform all the usual accounting functions in addition to being an administrator.

This way of modeling would be to show the relationships between the Administration agent and any governance use cases, and then show all the specific accounting use cases related to the agent" Accountant". And now the only thing you need to do for "Admin" to have access to the accounting functionality is to use the general relationship between "Accountant" and "Admin" with the Administration agent member (descendant) inherits from the accounting agent (ancestor).


Use Case Generalization

What is Use Case Generalization??


It is a type of relationship between the use-case. This is much the same to the actor generalization. Ancestor's behavior is inherited by descendants. This relationship applies when there is a common behavior between the two use cases and also a unique specific behavior for each use case.

Consider this scenario, like we can do the Payment either by Cash or by Card or by Coupons. Here parent class does not exist without its child class meaning we have to choose one mode to do the payment.

For example, we may pay by cash, card, or coupon. Here, the superclass doesn't exist without its subclass, which means we have to choose a mode to make the payment. That is, in the banking example, there might be a use case called “Invoice Payment”. This can be generalized to "Pay with Credit Card", "Pay with Bank Balance" and so on. Now that we have studied Generalization, lets move on to the other two types of relationships in Use Case Diagrams i.e., Include and Extend.


Extend

Many people are confused about extended relationships in use-cases. As the name implies, it extends the basic use cases and enhances the functionality of the system. Keep the following in mind when using the << extend >> relationship::

  • The extending use case is dependent on the base (extended) use case:

In the diagram below, the "Calculate Bonus" use-case doesn't make much sense without the "Deposit" use case.

  • The extending use-case is generally optional and can be activated conditionally:

In the chart you can see that the extended use-case is only activated for deposits greater than 10,000 or when the age is greater than 55.

  • The extended (base) use-case itself should mean:

This means it should be independent and should not depend on the behavior of the extending use-case.

Include

The include relationship shows that the behavior of the included use-case is part of the including (base) use-case. The prime reason is to reuse common actions in many use-cases. In some scenarios, this is done to simplify complex behaviors. Some things to keep in mind when utilizing the <<include>> relation:


· It is a mandatory relationship between the elements.

· Parent class is incomplete without its child class.


Example 2: To transfer Cash it is mandatory to check the availability of balance in account. It is the compulsory relationship between Check balance in Account and Transfer Cash.


Template for Use Case Narratives:

USE_CASE_NARRATIVES_template.docx