6 Use Case Diagrams
6 Use Case Diagrams
Answers 3 questions:
1. Who? As a <type of user>,
2.Does what? I want <some behavior from the system>
3.And why? so that <some value is achieved>
Use Case Diagrams
• A picture
• describes how actors relate to use cases
• and use cases relate to one another
• Diagrams are not essential
• They are helpful in giving an overview, but only
secondary in importance to the textual description
• They do not capture the full information of the
actual use cases
• In contrast, text is essential
Use Case Diagram Objective
A standard form of use case diagram is defined in the Unified Modeling Language.
Elements of use case diagram: Actor
• Actor is someone interacting with use case
(system function). Named by noun.
1
3
Elements of use case diagram: Use Case
Do something
= Use Case
1
4
Elements of use case diagram: Other details
Boundary of system
<<include>>
<<extend>>
15
Linking Use Cases
• Association relationships
• Generalization relationships
• One element (child) "is based on" another element
(parent)
• Include relationships
• One use case (base) includes the functionality of
another (inclusion case)
• Supports re-use of functionality
• Extend relationships
• One use case (extension) extends the behavior of
another (base)
Use Case Levels
1. Generalization
• The child use case inherits the
behavior and meaning of the parent
1
8
More about Generalization
registration
non-graduate graduate
registration registration
1
9
Generalization Example
2
2
More about Include
Enables us to avoid describing the same flow of
events several times by putting the common
behavior in a use case of its own.
updating
grades <<include>>
verifying
student
id
output <<include>>
generating
עדימ תוכרעמ 2
חותינ 3
Include relationship
• Include relationship – a standard case linked to a
mandatory use case.
2
Reading use case diagram with Include
relationship
2
5
Include Example
3. Extend
2
7
More about Extend
• Enables to model optional behavior or
branching under conditions.
<<extend>> Exam-grade
Exam copy
request appeal
2
8
Extend relationship
• Extend relationship – linking an optional use
case to a standard use case.
updating
grades
faculty
3
3
Example #1
place
place <<extend>>
conference
phone call
call
cellular
receive
receive <<extend>>
network additional
phone call
call
use
user scheduler
Cellular Telephone
3
4
Draw Use Case Diagram: Step-by-Step Guideline
4. Draw actors and connect them with use cases (if more intuitive, this can be done as
step 2)
5. Specify include and extend relationships between use cases (yes, at the end - not
before, as this may pull you into process thinking, which does not apply in UC
diagramming).
37
Use-Case Diagrams: Example [1]