7.b Use Case Modeling - Structuring System Process Requirements
7.b Use Case Modeling - Structuring System Process Requirements
SYSTEM PROCESS
REQUIREMENTS
Use Case
Modeling
COMSCI 2201
Functional vs. Non-functional
Functional
Requirements
Non-Functional
CLSU_ITDept_MIAMilagroso
Ways of Describing Use Cases
1. Text Description 2. Diagram Description
Use Case Diagram
It is a simple way of presenting an overview of a system’s
requirements.
A diagram that shows the relationships among actors and
use cases within a system.
It is often used to:
– Provide an overview of all part of the usage requirements for
a system or organization in the form of an essential model or a
business model.
– Communicate the scope of a development project.
– Model your analysis of your usage requirements in the form of
a system use case model. CLSU_ITDept_MIAMilagroso
Use Case Model
It is comprised of one or more use case diagrams
and any supporting documentation such as use case
specifications and actor definitions.
It should be developed from the point of view of your
project stakeholders and not from the (often
technical) point of view of developers.
CLSU_ITDept_MIAMilagroso
NOTATIONS
A description of a set of sequences of actions,
use case
including variants, that system performs that
yields an observable value to an actor.
extend Specifies that the target use case extends the <<extend>>
behavior of the source.
Actors
Primary actors:
– Supply data or receive information from the system.
– Provide details on what the use case should do.
Supporting actors:
– Help to keep the system running or provide help.
– The people who run the help desk, the analysts,
programmers, and so on.
CLSU_ITDept_MIAMilagroso
Actors (cont…)
CLSU_ITDept_MIAMilagroso
For identifying use cases, Jacobson et al.
(1992) recommend that you ask the
following questions:
What are the main tasks performed by each actor?
Will the actor read or update any information in the
system?
Will the actor have to inform the system about
changes outside the system?
Does the actor have to be informed of unexpected
changes?
CLSU_ITDept_MIAMilagroso
Use Case (Examples)
USER/ACTOR USER GOAL = USE CASE
CLSU_ITDept_MIAMilagroso
Rules for Use Cases
1. Use Case names begin with a strong Verb
2. Name Use Cases using domain terminology
3. Place your Primary Use Cases in the top-left corner
of the diagram
4. Imply timing considerations by stacking Use Cases.
CLSU_ITDept_MIAMilagroso
Use Case (Examples)
CLSU_ITDept_MIAMilagroso
Relationships
There are several types of relationships that may appear on a use
case diagram:
– An association between an actor and a use case
– An association between two use cases
– A generalization between two actors
– A generalization between two use cases
Associations are depicted as lines connecting two modeling
elements with an optional open-headed arrowhead on one end
of the line indicating the direction of the initial invocation of the
relationship.
Generalizations are depicted as a close-headed arrowhead with
the arrow pointing towards the more general modeling element.
Relationships (Example)
CLSU_ITDept_MIAMilagroso
<<extend>> vs. <<include>>
Extend relationship
– An association between two use cases where one adds new behaviors
or actions to the other.
– It is shown as a dotted-line arrow pointing toward the use case that has
been extended and labeled with the <<extend>> symbol.
<<extend>> vs. <<include>>
Include relationship
– An association between two use cases where one use case
uses the functionality contained in the other.
– The included use case cannot stand alone and the original
use case is not complete without the included one.
– An include relationship is shown diagrammatically as a
dotted-line arrow pointed toward the use case that is being
used.
– The line is labeled with the <<include>> symbol.
<<include>> Example
Rules for Relationships
1. Indicate an association between an actor and a use case if
the actor appears within the use case logic
2. Avoid arrowheads on actor-use case relationships (if
necessary)
3. Apply <<include>> when you know exactly when to invoke
the use case
4. Apply <<extend>> when a use case may be invoked across
several use case steps
5. Generalize use cases when a single condition results in
significantly new business logic
6. Avoid more than two levels of use case associations.
CLSU_ITDept_MIAMilagroso
System Boundaries Boxes
The rectangle around the use cases is called the system
boundary box.
It indicates the scope of your system – the use cases inside
the rectangle represent the functionality that you intend to
implement.
Rules for System Boundaries
CLSU_ITDept_MIAMilagroso
Use Case Diagram
– Guidelines & Caution
1. Use cases should ideally begin with a verb – i.e Generate
report.
2. Use cases should NOT be open ended – i.e Register (instead
should be named as Register New User)
3. Avoid showing communication between actors.
4. Actors should be named as singular. i.e Student and NOT
Students. NO names should be used – i.e John, Sam, etc.
5. Do NOT show behavior in a use case diagram; instead,
depict only system functionality.
6. Use case diagram does not show sequence – unlike DFDs.
CLSU_ITDept_MIAMilagroso
More example…
The clock shows the time of day. Using buttons, the user can set the
hours and minutes fields individually, and choose between 12 and 24-
hour display. It is possible to set one or two alarms. When an alarm fires,
it will sound some noise. The user can turn it off, or choose to ’snooze’. If
the user does not respond at all, the alarm will turn off itself after 2
minutes. ’Snoozing’ means to turn off the sound, but the alarm will fire
again after some minutes of delay. This ’snoozing time’ is pre-adjustable.
Identify the top-level functional requirement for the clock, and model it
with a use case diagram.
Solution
Use Case Quiz will be conducted on our
face-to-face class meeting…
CLSU_ITDept_MIAMilagroso