Relationships in use case diagram
A use case diagram is a graphical representation of the requirement. It shows the interaction between the actor (living thing or non-living thing) and the system.
Following are the basic notation used in the use case diagram:
- System Boundary: A rectangle used to show the system boundary.
- Actor: An actor used to show the user of the system. Actor can be living things like customer or non-living thing printer. There are two types of actor:
- Primary Actor is those actors who use the system. It should be always on the left side of the system boundary.
- Secondary Actor is those actors who help the system to provide service. It should be on the right side of the system boundary.
- Use Case: An eclipse or ovals used to show the use case. It should be always inside the system boundary.
A connector is used to show the relationship between elements. Following are the commonly used connector to show relationship:
- Include: It is used to show the relationship between the use cases, i.e. main or base use case is uses or includes the functionality the other use case. It shows mandatory functionality given to the user. It shows with <<include>> or <<uses>>.
- Extend: It is used to show the relationship between use cases. Its shows the extended functionality of the use case, this is extra or optional functionality given to the user. It shows with <<extend>>.
- Generalization of use case: It is used to show relationship between use cases when base use case have more than one child use case with specific specialization and any one of them is mandatory to complete the functionality. For e.g. Payment can be done by card, cash or net banking.
- Association: This is used to shoe relationship between Actor and use case. It is show with straightforward line.
- Generalization of actor: It is used to show relationship between actors. The base actor can have all functionality but child actor has one or more specific functionality. For e.g. Customer can have normal account in the bank but VIP customer have Safe Deposit locker in the bank along with normal account.