UML Diagrams: Use Case Diagram
UML Diagrams: Use Case Diagram
UML Diagrams: Use Case Diagram
1. Use cases.
2. Actors.
3. Relationships
4. System boundary boxes (optional).
1. Use Cases
A use case describes a sequence of actions that
provide something of measurable value to an
actor and is drawn as a horizontal ellipse.
a use case illustrates how someone might use the
system.
2. Actors
An actor is a person, organization, or external
system that plays a role in one or more interactions
with your system.
Actors are drawn as stick figures.
Actors are anything that is outside the system's
scope
types of actors:
› users of the system
› other systems that will interact with the system being
built
3. Relationships (1)
Association Relationship (actor and use case)
An association relationship is a relationship between an
actor and a use case.
It indicates that a particular actor initiates the
functionality provided by the use case.
3. Relationships (2)
Includes Relationship (use case and use case)
Include relationship show that the behavior of the
included use case is part of the including (base) use
case.
The base use case is incomplete without the included
use case.
The included use case is mandatory and not optional.
3. Relationships (3)
Extends Relationship (use case and use case)
An extends relationship allows one use case the option to
extend the functionality provided by another use case.
While the "Change Reservation" use case is running,
"Check Credit" runs if and only if the amount of the
reservation has changed.
Because "Check Credit" is optionally run, there is an
extends relationship between the use cases.
The arrow is drawn from the use case that is optionally run
to the use case that is being extended.
3. Relationships (4)
Generalization (actor and actor) or (use case and use
case)
4. System boundary boxes
(optional)
You can draw a rectangle around the use cases,
called the system boundary box, to indicates the
scope of your system.
Anything within the box represents functionality
that is in scope and anything outside the box is
not.
4. System boundary boxes
(optional)
Examples
Case Study (1)
A book is written by an author, published by a
publisher, sold by a book store, and buy or
borrow by a reader. Moreover, for a reader to
read a book, he might buy or borrow it from a
book store that is selling it. Draw a use case
diagram for this scenario, showing relationships
between different use cases.