In lesson Use case diagrams, we mentioned that it is possible to reuse use case diagrams. One way was inclusion, another was extension. These are relationships among use cases, and there are two other kinds of relationships: generalization and grouping.
Inclusion
Inclusion enables you to reuse one use case's steps inside another use case.
To
represent inclusion, you use the symbol you used for dependency between classes - dotted
line connecting the classes with an arrowhead pointing to the depended-on class. Jus above
the line, you add a stereotype-the word <<include>> enclosed in guillements.
Extension
Extension allows you to create a new use case by adding steps to an existing use case.
Also
here a dotted arrowhead line is used to represent extension, along with a stereotype that
shows <<extends>> in guillements. Within the base use case, the extension
point appears below the name of the use case.
Generalization
Classes can inherit from one another and so can use cases. In use case inheritance, the
child use case inherits behavior and meaning from the parent, and adds its own behavior.
You can apply the child wherever you apply the parent.
Generalization
is modeled the same way you model class generalization - with a solid line that has an
open triangle pointing at the parent.
The generalization relationship can exist between actors as well as use cases.
Grouping
In some use case diagrams, you might have a multiple of use cases and you'll want to
organize them. This could happen when a system consists of a number of subsystems.
The most straightforward way is to organize group related use cases into a package (a tabbed folder).
In next lesson Use Case Diagrams - Example we'll look closely to all of these relationships, to help you understand use cases as a part of use case diagrams.