

Content: Use Case RelationshipUse Case diagram (uc): A Use Case diagram shows communications among system transactions ( Use Cases) and external users ( Actors) in the context of a system boundary ( Subject notation: rectangle). We will also discuss the kind of relationship that can be structured between the use cases. In this section, we will discuss in brief about modelling the relationship between use cases to represent a large and complex system.
A use case represents a bit of systems functionality and actors are the objects which interact with the system to get the work done from the system for which it is designed.Custom icons that convey the kind of actor may also be used to denote an actor, such as using a separate icon(s) for non-human actors. A use case diagram has a set of ‘use cases’ and ‘actors’. In our previous content, we have discussed the use case diagram which represents the working of the system. Defining relationships between the.
The independent use cases can represent a simple application but to represent the complex or large applications the system analyst needs to structure the complex relationship between the use cases.Other UML diagram types are Use Case Diagram, Sequence Diagram, and Activity Diagrams. Video-Rental LTD case study Video-Rental LTD is a small video. Case study We shall be using the following case study to explore different aspects of data-flow modeling and diagrams.
The include use case may or may not appear as behavior sequence on its own.Let’s move on an example which would help us in understanding the include relationship among the use cases more clearly. The use cases that need to be described repeatedly for a complex or a large system are modelled once and included in the other uses cases when required.Include use case is similar to subroutines, as they are the set of instructions which are repeatedly used in the program, but this set of instructions is written only once and are called whenever required. Like flowcharts, UML diagrams.Establishing relationships between the use cases allow reusing those use case which needs to be defined repeatedly and this reduces the efforts of developers.The kinds of relations that could be modelled between use cases are as follow:Include relationship is modelled between the use cases when a use case includes the behavior sequence of another use case.
Types Of Use Case Diagrams Password Is Repeatedly
The dashed arrow is always annotated by the keyword > to show the include relationship.Extend relationship adds up behavior sequence to the base use case. Like, in the above figure the arrow head is pointed towards the validate password. The arrow head is pointing towards the included use case. You can observe in the figure above that though use case validate password is repeatedly used by other use cases and it is modelled only once.The include relationship is presented with a dashed arrow in UML diagram.
The arrow head points to the base use case. This additional feature is added to the base use case when (condition) the stocks purchase cost is checked against the balance available in the customer account and it is found that the balance is insufficient to purchase the stock.The extend relationship in UML notation is represented with the dashed arrow. Now, if the customer has insufficient balance in his account but still, he wants to purchase the stock.For this situation, the stock brokerage system adds a feature or extension, margin trade which allows the customer to take a loan to purchase the stock. A stock brokerage system has a use case trade stock, which allows the customer to buy the stock for the cash in the account. This is the scenario when initially the basic elements are modelled and then advanced features are added to the base.Let’s take an example of extend the relationship to understand it properly. But in the extend relationship, the extended use case adds its behaviour sequence to the base use case.Well, when we observe both ‘include’ and ‘extended’ relationship both add up behavior sequence to the base use case.
The child class add up attributes and operation to the parent class but the order of insertion is not so important.While the child use case adds its behavior sequence in a specific location within the behavior sequence of the parent class.In classes, we also have the concept of multiple inheritance but we can’t implement such a complex concept in use cases. Generalization in the use case is represented with the triangular arrow where the arrow head points to the parent use case.Well, the generalization in the use case is little complex when compared with generalization among classes. The parent use case contains the common behavior sequence and the child use case contains the refined features. In generalization, there is a parent class consisting of common attributes and operations and the child class contains the refined attributes and operations.Analogues to generalization in classes there is a concept of generalization in use case relationship. When the condition becomes true the extension use case’s behavioral sequence occurs.Generalization is the most common term in computers. The extension use case appears at a specific point in the behavior sequence of the base class, most of the time it is a condition.
Include use case is one where a use case incorporates another use case. Use case relationship defines the complex relation between the use cases. The figure below shows the use case diagram of the stock brokerage system which shows how a use case diagram represents several relationships between the use cases.
Generalization in the use case is similar to generalization in classes. It occurs at a specific point in the base use case behavior sequence, in most cases that point is a condition. The extend use case never appear on its own as a behavior sequence. In UML notation the extend relationship is annotated with the > keyword and a dashed arrow pointing towards the base use case. Extend relationship is one where the extension use case adds itself to the base use case. Include relationship may or may not appear on its own as a behavior sequence.
We have seen how it is important to structure the relationship between the use cases to model a large or complex application. A single use case diagram incorporates several use case relationships.So, this is all about the use case relationship.
