0% found this document useful (0 votes)
24 views50 pages

6 Use Case Diagrams

Use case diagrams are a visual representation of how actors interact with a system and its functionalities, focusing on user goals and system behavior. They include elements such as actors, use cases, and relationships like include and extend, helping to specify system requirements and validate architecture. The document outlines the process of creating use case diagrams, including identifying actors, defining use cases, and establishing relationships, along with examples to illustrate these concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views50 pages

6 Use Case Diagrams

Use case diagrams are a visual representation of how actors interact with a system and its functionalities, focusing on user goals and system behavior. They include elements such as actors, use cases, and relationships like include and extend, helping to specify system requirements and validate architecture. The document outlines the process of creating use case diagrams, including identifying actors, defining use cases, and establishing relationships, along with examples to illustrate these concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Use Case Diagrams

What is a use case?


• A requirements analysis concept
• A case of a use of the system/product
• Describes the system's actions from a the point of
view of a user
• Tells a story
• A sequence of events involving
• Interactions of a user with the system
• Specifies one aspect of the behavior of a system,
without specifying the structure of the system
• Is oriented toward satisfying a user's goal
How do we describe use cases?

• Textual or tabular descriptions


• User stories
• Diagrams
Use Case Descriptions
• actors - something with a behavior or role, e.g., a
person, another system, organization.
• scenario - a specific sequence of actions and
interactions between actors and the system, a.k.a. a
use case instance
• use case - a collection of related success and failure
scenarios, describing actors using the system to
support a goal.
What is an Actor?
• Include all user roles that interact with the system
• Include system components only if they responsible for
initiating/triggering a use case.
• For example, a timer that triggers sending of an e-mail reminder
• primary -
• a user whose goals are fulfilled by the system
importance: define user goals
• supporting /Secondary
• provides a service (e.g., info) to the system
• importance: clarify external interfaces and protocols
• offstage –
• has an interest in the behavior but is not primary or supporting, e.g.,
government
• importance: ensure all interests (even subtle) are identified and
satisfied
Finding Actors [1]
External objects that produce/consume data:
• Must serve as sources and destinations for data
• Must be external to the system
Finding Actors [2]
Ask the following questions:

• Who are the system’s primary users?


• Who requires system support for daily tasks?
• Who are the system’s secondary users?
• What hardware does the system handle?
• Which other (if any) systems interact with the system in
question?
• Do any entities interacting with the system perform
multiple roles as actors?
• Which other entities (human or otherwise) might have an
interest in the system's output?
What is a user story?
•An abbreviated description of a use
case
•Used in agile development

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

• Built in early stages of development


• Purpose
• Specify the context of a system
• Capture the requirements of a system
• Validate a systems architecture
• Drive implementation and generate test
cases
• Developed by analysts and domain
experts
How do use case diagrams fit in?

This applies also to use case


descriptions.
Diagram reproduced from www.edrawsoft.com.
Example Use-Case Diagram

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.

•Similar to the concept of user, but


a user can play different roles;
Nam (example: a prof. can be instructor and
e
researcher – plays 2 roles with two systems).

• Actor triggers use case.


•Actor has responsibility toward the system (inputs),
and Actor have expectations from the system (outputs).

1
3
Elements of use case diagram: Use Case
Do something

• System function (process – automated or manual).


• Named by verb.
• Each Actor must be linked to a use case, while some
use cases may not be linked to actors.

= Use Case

1
4
Elements of use case diagram: Other details

Connection between Actor and Use Case

Boundary of system

<<include>>

Include relationship between Use Cases (one UC must


call another; e.g., Login UC includes User Authentication UC)

<<extend>>

Extend relationship between Use Cases (one UC calls


Another under certain condition; think of if-then decision points)

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

parent use case.


• The child may add to or
child
override the behavior of its
parent.

1
8
More about Generalization

registration

non-graduate graduate
registration registration

1
9
Generalization Example

The actor Order Registry


Clerk can instantiate
the general use case
Place Order.
Place Order can also be
specialized by the use
cases Phone Order or
Internet Order.
Generalization Example
2. Include

base <<include>> included

• The base use case explicitly incorporates the


behavior of another use case at a location
specified in the base.
• The included use case never stands alone. It
only occurs as a part of some larger base that
includes it.

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.

• Example: to Authorize Car Loan (standard use case),


a clerk must run Check Client’s Credit History (include
use case).

• The standard UC includes the mandatory UC (use


the verb to figure direction arrow).

•Standard use case can NOT execute without the include


case  tight coupling .

2
Reading use case diagram with Include
relationship

2
5
Include Example
3. Extend

base <<extend>> extending

• The base use case implicitly incorporates the


behavior of another use case at certain points
called extension points.
• The base use case may stand alone, but under
certain conditions its behavior may be
extended by the behavior of another use case.

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.

• Example: Register Course (standard use case)


may have Register for Special Class (extend use
case) – class for non-standard students, in
unusual time, with special
topics, requiring extra fees…).

• The optional UC extends the standard UC

• Standard use case can execute without the


extend case
 loose coupling.

Reading extend relationship


2
9
Extend Example #1
Extend Example #2
Extend Example #2 cont.
Relationships between Use Cases
and Actors
Actors may be connected to use cases by
associations, indicating that the actor and the
use case communicate with one another using
messages.

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

The current section explains the step-by-step


approach to drawing a Use Case diagram. Refer
to the ‘Document Sample’ and select the
‘System’ with the status – Approved i.e. ‘Online
Training Registration. Change the status to Use
Case Diagram ‘started’ to facilitate progress
tracking of each System.
Understand the system by referring to the brief
and scope of the System detailed in the ‘List of
System’ section of the document.
Draw Use Case Diagram: Step-by-Step Guideline
Step 1:Draw the System Boundary and name the
system
Step 2:
Draw the actors by referring to the column ‘Allowed actors’ in the ‘List of System’ section and
name them as per the project standard icon and names as described in the ‘List of Actors’ section
of the document.
The actors ‘New-User’, ‘Registered-User’, and ‘Employee–Cashier’ are the primary actors of the
system.
The other two support service actors, i.e. the ‘Bank-Payment-Service’ and the ‘User-
Authentication-Service’ are the supporting actors.
Step 3:
Draw the use case in the scope of the system by referring to the column ‘Use Case names’ in the
‘List of System’ section and name the use cases as mentioned in the ‘List of Use Cases‘ section of
the document.
Step 4:
Add the Include and extension use cases for the in-scope use cases by referring to the ‘List of Use Cases‘
section of the document. ‘Join-a-Course’ includes two Use cases–‘Course-payment’ and ‘View-Courses’.
Establish the association with a dash-line starting from the base use case with an arrow pointing to the
included two use cases.
Depict ‘Register-User’ with its two extension points with ‘Register-help’ and ‘Location-Search-help’ and
associate it with a dashed line and an arrow pointing to ‘Register-User’.
The Note feature can be added as shown in the diagram to give details.
Step 5:
Establish the link between the actors and the Use cases. The column ‘Allowed Actors/Multiplicity number of Actor’ in the ‘List
of Use Cases‘ section of the document gives all the actors to Use case association.
There can be some actor that is allowed by the Use case but they do not have any role in the current system being depicted.
Like the actor ‘Instructor’ that can access use case ‘View-Courses’ but does not have a role in the current system being
depicted.
This completes the ‘Online Training Registration’ system depiction.
How to create use case diagram
1. List main system functions (use cases) in a column:
– think of business events demanding system’s response
– users’ goals/needs to be accomplished via the system
– Create, Read, Update, Delete (CRUD) data tasks
– Naming use cases – user’s needs usually can be translated in data tasks
2. Draw ovals around the function labels

3. Draw system boundary

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]

I. Begin with a Use Case!


A user placing an order with a sales company might
follow these steps :
1. Browse catalog and select items.
2. Call sales representative.
3. Supply shipping information.
4. Supply payment information.
5. Receive conformation number from salesperson.
II. Then translate Use Case sequence into Diagram
Use-Case Diagrams: Example [2]

The salesperson could also


be included in this use case
diagram because the
salesperson is also
interacting with the
ordering system.
Restaurant use case diagram
In this example, a restaurant’s daily operations serve as the system, the
staff represent the actors, and their tasks are the use cases.
Use Case Diagram Examples
This diagram represents Online Shopping System
that has three independent functionalities in
scope. Complete checkout and view items are
two included functionality of Make purchase.
The primary actor is the Customer and there are
four supporting actors which are services like
identity providers, service authentication, and
external applications like PayPal, Credit payment
services.
Use Case Diagram Examples
This diagram represents a system Website that
has 7 functionalities in scope.
There are two Actors Webmaster and the Site
user. The Search Doc functionality has two
included functionalities Preview doc and
Download doc.
The Preview doc includes Browse doc
functionality. There are two extension points
one for each use case Upload doc and Add user.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy