Use Case Diagrams: Slide 1
Use Case Diagrams: Slide 1
Slide 1
Use Cases
Slide 2
Use Case Analysis
• 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.
Slide 3
Use Cases
• Use case diagrams describe what a system does from the standpoint
of an external observer. The emphasis is on what a system does
rather than how.
Slide 4
Use Cases
• Here is a scenario for a medical clinic.
• A patient calls the clinic to make an appointment for a yearly checkup. The
receptionist finds the nearest empty time slot in the appointment book and
schedules the appointment for that time slot. "
Slide 5
Use Cases
• A patient calls the clinic to make an appointment for a yearly checkup. The
receptionist finds the nearest empty time slot in the appointment book and
schedules the appointment for that time slot. "
Slide 6
Use Cases
• A patient calls the clinic to make an appointment for a yearly checkup. The
receptionist finds the nearest empty time slot in the appointment book and
schedules the appointment for that time slot. "
Slide 7
Questions for Identifying People Actors
Slide 8
Questions for Identifying Other Actors
Slide 9
Actors
Slide 10
Use Cases
Slide 11
Use Cases
• A patient calls the clinic to make an appointment for a yearly checkup. The
receptionist finds the nearest empty time slot in the appointment book and
schedules the appointment for that time slot. "
Slide 12
Use Cases
Slide 13
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).
Actors are stick figures. Use cases are ovals. Communications are
lines that link actors to use cases.
Slide 14
Use Case Componentss
• The use case has three components.
Slide 15
Use Case Diagram - Use Case
Slide 16
Use Case
Slide 17
Use Case
Make
Appointment
Slide 18
Use Case - Actor
Slide 19
Use Case - Relationships
• Relationships
• Represent communication between actor and use case
• Depicted by line or double-headed arrow line
• Also called association relationship
Make
Appointment
Slide 20
Use Case - Relationships
• Boundary
• A boundary rectangle is placed around the perimeter of
the system to show how the actors communicate with
the system.
Make
Appointment
Slide 21
Use-Case Diagram
• Generalization
• Include
• Extend
Slide 23
Components of Use Case Diagram
• Generalization Relationship
• Represented by a line and a hollow arrow
• From child to parent
Slide 24
Example of Relationships
Slide 25
Use Case Diagram
• 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
Slide 26
Use Case Diagram
• 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
Slide 27
Example of Relationships
Slide 28
Use Case Relationships
• Pro:
• Reduces redundancy in use cases
• Reduces complexity within a use case
• Con
• May introduce complexity to use case diagram
Slide 29
Use Case Specification/Text
Slide 31
Benefits of Use Cases
• Use cases are the primary vehicle for requirements capture in RUP
• Use cases are described using the language of the customer (language
of the domain which is defined in the glossary)
• Use cases provide a contractual delivery process (RUP is Use Case
Driven)
• Use cases provide an easily-understood communication mechanism
• When requirements are traced, they make it difficult for requirements
to fall through the cracks
• Use cases provide a concise summary of what the system should do at
an abstract (low modification cost) level.
Slide 32
Difficulties with Use Cases
• As functional decompositions, it is often difficult to make the transition
from functional description to object description to class design
• Reuse at the class level can be hindered by each developer “taking a
Use Case and running with it”. Since UCs do not talk about classes,
developers often wind up in a vacuum during object analysis, and can
often wind up doing things their own way, making reuse difficult
• Use Cases make stating non-functional requirements difficult (where do
you say that X must execute at Y/sec?)
• Testing functionality is straightforward, but unit testing the particular
implementations and non-functional requirements is not obvious
Slide 33