Sunteți pe pagina 1din 16

Use Cases

Chapter 9 [Uml Distilled]


Chapter 3 [Visual Modeling]

System Behavior
what functionality must be provided
by the system
Documented in use case model that
illustrates the system's intended
functions (use cases), its
surroundings (actors), and
relationships between the use cases
and actors (use case diagrams)

Scenario
Sequence of steps describing an interaction
between a user and a system
Example:
The customer browses the catalog and adds desired
items to the shopping basket. When the customer
wishes to pay, the customer describes the shipping
and credit card information and confirms the sale.
The system checks the authorization on the credit
card and confirms the sale both immediately and
with a follow-up e-mail.

A use case is a set of scenarios tied together by


a common user goal.

Use Cases

Technique for capturing functional requirements


Describe interaction between user and system
providing a narrative of how a system is used
The following questions may be used to help
identify the use cases for a system:
What are the tasks of each actor?
Will any actor create, store, change, remove, or read information in
the system?
What use case will create, store, change, remove, or read this
information?
Will any actor need to inform the system about sudden, external
changes?
Does any actor need to be informed about certain occurrences in
the system?

Actor
Role that a user plays with respect to the system
Interact with the system
An actor may perform more than one use cases
A use case may have more than one actors
One person can act as more than one actor
An actor is not necessary a human

An actor may
only input information to the system
Only receive information from the system
Input and receive information to and from the system

Use case diagram


graphical view of some or all of the actors, use
cases, and their interactions identified for a
system
Which actors carry out which use cases
Which use cases include other use cases

Main use case diagram consist all actors and


use cases.
A use case diagram may:
Show all use cases for selected actor
Show all use cases for an iteration
Show a use case and all its relationship

Use case diagram

Content of Use Case


No specific standard exists on this

Content of Use Case


Main success scenario
Extensions
Variations
Can be success or failure

Primary actor: calls on the system to


deliver a service.
Secondary actors: with which system
communicates while carrying out use case
Each step describe interaction

Content of Use Case


A use case may also contain
information like:
Pre-condition: what must be true
before the system allows the use case to
begin
Guarantee: what should be result at
the end
Trigger: event that gets the use case
started.

Use Case Relationships


Communication Association:
Can be navigable in:
Both direction: actor to use case and use
case to actor
One direction: actor to use case or use case
to actor

Direction shows who is initiating


communication
Represent by a line connecting actor
and use case
One direction association represent by

Use Case Relationships


Multiple use cases may share pieces
of the same functionality.
Such functionality can place in
separate use case
Include relationships are created
between the new use case and any
other use case that "uses" its
functionality

Use Case Relationships


An extend relationship is used to show
Optional behavior
Behavior that is run only under certain
conditions such as triggering an alarm
Several different flows that may be run
based on actor selection

An extend relationship is drawn as a


dependency relationship that points
from the extension to the base use case

Use Case Relationships


Stereotype: provides
capability of extending
the basic modeling
elements to create new
elements
minimal set of symbols
that may be extended
Stereotype names are
included within
guillemets (< < > >)
and placed along the
relationship line

Points to ponder
Relationship between use case and
class diagram?
Content of use case is more valuable
than diagram
Dont make it complicated Keep it
Simple!

Reading Assignment
Structure and Style in Use Cases for
User Interface Design
http://
www.foruse.com/articles/structuresty
le2.pdf

S-ar putea să vă placă și