Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

uml
communitycreator

What are include and extend relationships in a use case diagram?

Eman Kashif

A UML use case diagram summarizes the interactions between a system and its users. A use case diagram can be made for a general scenario or multiple scenarios that encapsulate the system’s functioning.

The use case diagram displays three kinds of entities: the system, the actors, and the use cases. The system is represented by a box encompassing the use cases. The actors are users or systems that interact with the main system and are represented by figures. The use cases are functions performed by the actors interacting with the system. Ellipses represent use cases.

To represent complex relationships between different use cases, we can use the extend and include relationships.

  • Extend relationship: The use case is optional and comes after the base use case. It is represented by a dashed arrow in the direction of the base use case with the notation <<extend>>.

  • Include relationship: The use case is mandatory and part of the base use case. It is represented by a dashed arrow in the direction of the included use case with the notation <<include>>.

widget

In the above use case diagram, the use case “Open book” includes the use case “Read book”. If a reader opens the book, she must read it too, as it is mandatory for the base use case (open book). The use case “read book” extends to the use case “turn page”, which means that turning the page while reading the book is optional. The base use case in this scenario (read book) is complete without the extended use case.

RELATED TAGS

uml
communitycreator
RELATED COURSES

View all Courses

Keep Exploring