Use Case Diagrams
Use Case Diagrams
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide1
Slide1
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide2
Slide2
What is an Actor?
A user or outside system that interacts
with the system being designed in order
to obtain some value from that
interaction
Use Cases describe scenarios that describe
the interaction between users of the system
(the actor) and the system itself.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide3
Slide3
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide4
Slide4
Use Cases
SoftwareEngineering,7thedition.Chapter4
Slide5
Slide5
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide6
Slide6
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide7
Slide7
SoftwareEngineering,7thedition.Chapter4
Slide8
Slide8
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide9
Slide9
Actors
Human
Peripheral device (hardware)
External system or subsystem
Time or time-based event
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide10
Slide10
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide11
Slide11
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide12
Slide12
Use Cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide13
Slide13
Use Cases
The picture below is a Make Appointment use case for the medical
clinic.
The actor is a Patient. The connection between actor and use case
is a communication association (or communication for short).
tickfigures.Usecasesareovals.Communicationsarelinesthatlinkactors
Actorsarestickfigures.Usecasesareovals.Communicationsare
linesthatlinkactorstousecases.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide14
Slide14
SoftwareEngineering,7thedition.Chapter4
Slide15
Slide15
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide16
Slide16
Use Case
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide17
Slide17
Use Case
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide18
Slide18
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide19
Slide19
Relationships
Represent communication between actor and
use case
Depicted by line or double-headed arrow line
Also called association relationship
Make
Appointment
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide20
Slide20
Boundary
A boundary rectangle is placed around the
perimeter of the system to show how the actors
communicate with the system.
Make
Appointment
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide21
Slide21
Use-Case Diagram
Ausecasediagramisacollectionofactors,usecases,andtheir
Slide22
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide22
communications.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide23
Slide23
Generalization Relationship
Represented by a line and a hollow arrow
From child to parent
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide24
Slide24
Example of Relationships
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide25
Slide25
Include Relationship
Represents the inclusion of the functionality
of one use case within another
Arrow is drawn from the base use case to the
used use case
Write << include >> above arrowhead line
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide26
Slide26
Extend relationship
Represents the extension of the use case
to include optional functionality
Arrow is drawn from the extension use
case to the base use case
Write << extend >> above arrowhead line
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide27
Slide27
Example of Relationships
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide28
Slide28
Pro:
Reduces redundancy in use cases
Reduces complexity within a use case
Con
May introduce complexity to use case
diagram
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide29
Slide29
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide30
Slide30
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide31
Slide31
Participants:
IanSommerville2004
Domain Expert
Architect
Analyst/Designer (Use Case author)
Testing Engineer
SoftwareEngineering,7thedition.Chapter4
Slide32
Slide32
Use cases
Architecture
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide33
Slide33
IanSommerville2004
SoftwareEngineering,7thedition.Chapter4
Slide34
Slide34