You are on page 1of 18

Use Case Diagrams

❚ Value
❚ Model
❙ Actors
❙ Use Cases
❙ Relationships

CIS 320-04 1
Example Diagram

Manage
Resources

Project Manager
Manage
Projects Project Manager

CIS 320-04 2
Value of Use Case Diagram
❚ Succinct visual context diagram of the
system
❚ Adjunct to Use Case text
❚ Not to be overly relied upon
❚ Use Case text should be the focus, not
diagrams

CIS 320-04 3
Diagrams Model
❚ Model actors
❚ Model use cases
❚ Model relationships
❙ between actors and use cases
❙ between use cases and other use cases

CIS 320-04 4
Actors
❚ Actors represent users of the system.
❙ They can be human or other systems.

<<actor>>
Backup System

Project Manager

CIS 320-04 5
Actors
❚ Actors define roles that objects external to
a system may play.
❙ Human or other systems
❚ They are characterized by an external
view not internal structure.
❚ They participate in message exchanges,
actions with the system.

CIS 320-04 6
Actors
❚ Have goals and instances
❚ One role per communicates relationship
❚ Stereotyped using <<actor>> keyword
❚ An object may play several roles
simultaneously

CIS 320-04 7
Actors use or participate in the
functionality provided by use cases
Boundary of system
- communicates relationship
Overview Diagram
Name of system

Project and Resource Management System

Manage
Resources

Project Manager
Manage
Projects Project Manager
Stereotype

<<actor>>
Administration
Backup
System
System

Use Case System Manager


CIS 320-04 8
Use Cases

Name
Name
Extension Points
Extension-Point-Name

CIS 320-04 9
Communicates Relationship

<<communicates>>
Use Case

Actor simply participates in the use case.

<<communicates>>
Use Case

Actor utilizes services provided by the use case.


CIS 320-04 10
Communicates Relationship
❚ Only relationship permissible between
actors and use cases.
❚ Allow a single actor to participate in any
number of use cases.
❚ Allow a single use case to have any
number of participating actors.

CIS 320-04 11
Uses Relationship
❚ Generalization between use cases.
❚ A base use case instance also includes
the behaviour specified by a common use
case.
❙ Share common behaviour among use cases
❙ Generalization arrow, stereotype <<uses>>

CIS 320-04 12
Uses Example
Add
Skill

Remove <<uses>> Find


Skill Skill

Update <<uses>>
Resource Manager Skill

<<uses>> stereotype : Find Skill is “used” by Remove and Update


Skill

<<uses>> uses relationship


CIS 320-04 13
Extends Relationship
❚ Generalizations between use cases.
❚ A base use case instance may include
behaviour specified by an extending use
case subject to conditions specified in the
extension
❙ Exceptional behaviour
❚ Denoted as generalization arrows.

CIS 320-04 14
Extends Relationship

<<extends>>
Base Extending
Use Case Use Case

Must be stereotyped

Must have a condition determining when the


extending use case will be inserted

CIS 320-04 15
Example Use Case Diagram
<<extends>> extends relationship
- indicates that these use cases are
options from the Update Resource
Add use case
Resource - makes functionality optional to a
Resource Manager use case
Remove <<uses>> Find
Resource Resource

Update <<uses>>
Resource
<<extends>>
Unassign Skill
Assign Skill <<extends>> From Resource
To Resource

CIS 320-04 16
Restore Restore
Resource <<uses>> <<uses>> Project
Data Data
Restore data “uses” the
Restore combined functionality of
Data
Restore Resource and Restore
Project Data use cases.
<<extends>>

Startup
System
<<actor>>
Backup
System
Shutdown
System System
Not directly involved Administrator
in starting up or shutting <<extends>>
down the system.
Backup
Data

Backup Backup
<<uses>> <<uses>>
Resource Project
Data CIS 320-04 Data 17
Use Case Model
❚ The use case model combines use case
diagrams and supporting textual
documentation.

CIS 320-04 18

You might also like