SE331: Software Design & Architecture: Lecture # 2 Use Case Modeling
SE331: Software Design & Architecture: Lecture # 2 Use Case Modeling
Architecture
Lecture # 2
Use Case Modeling
Outline
What is a Use Case?
What is Use Case Actor?
Type of Actors
Primary Actor
Supporting Actor
Off-Stage Actor
Guidelines to find use cases
Relationships in use cases
Include Relationship
Extend Relationships
Generalization Relationships
Example Case Study
2
Outline
Case Study
Activity: find use cases, Actors and System boundary
Tool Description
Enterprise Architecture (EA)
Installation
Creating New Project
Drawing Use Case Diagram from Case study
Assignment Task
Make a group of two and propose a project
Describe the project in at least 500 words
There must be at least 5 use cases in the project
These must be at least 3 actors of the system
Use EA to draw use case diagram
Prepare a PDF document where you place: Actors and their
responsibilities, Use Case Diagram and justification of each use case
3
What is a Use Case?
4
What is Use Case Diagram?
5
Actor
Actors
Something with behavior such as person, computer system, or
organization
6
Kinds of Actors
Primary actor
has user goals fulfilled through using services of the SuD
why identify? To find user goals, which drive use cases
Supporting actor
provides a service (for example, information) to the SuD
why identify? To clarify external interfaces and protocols
Offstage actor
has an interest in the behavior of the use case
why identify? To ensure that all necessary interests are
identified and satisfied
7
Kind of Actors
NextGen
«actor»
Process Sale Payment
Authorization
Service
Cashier
...
«actor»
Cash In Accounting
System
Manager
«actor»
«actor» Analyze Activity
HR System
Sales Activity
System
Manage Security
10
Library Information System
(Problem Statement)
A computerized library system for a university keeps track of
all books and periodicals in the library and their check-out
status
Checkout and return are automated through a bar code
reader (an external device)
The library system also interfaces with an external relational
database which stores information about the library users
(students, faculty, and staff), including whether they have any
library items checked out
Library users can access the catalog and recall books and
periodicals
Library employees have the same access as well as
additional capabilities (e.g., listing the status of an item) 11
Library Information System
(Use Case Diagram)
Login
CheckIn
LibEmployee
BarCodeReader
CheckOut
LibUser CheckAvailability
UsersDB
Recall
Note: the library catalog is part of the library computer system so it is not shown
as an actor 12
Library Information System
(Use Case Text: Login)
1. Employee initiates use case by entering user
name and password
2. If user name and password is valid, employee is
logged on and now has access to employee
commands
13
Library Information System
(Use Case Text: CheckAvailability)
User/Employee initiates use case by selecting the check
book availability option
System prompts for choice of search by title, author, or
call number
User makes selection and enters title, author or call
number
System performs search through the library catalog
database
If a match is found, system displays item status (not
checked out, checked out and due date, overdue)
Problem:
A function in the original problem statement is too complex to be
solvable immediately
Solution:
Describe the function as the aggregation of a set of simpler
functions. The associated use case is decomposed into smaller
use cases
CreateDocument
≪include≫
≪include≫
≪include≫
Solution:
The include association from Use Case A to Use Case B
≪include≫
OpenIncident
ViewMap
Base Use ≪include≫
Case Supplier
AllocateResources Use Case
When to Use Include Relationship?
extended.
Solution:
An extend association from Use Case B to Use Case A indicates
that B is an extension of A.
Example:
The use case “ReportEmergency” is complete by itself , but can
ReportEmergency
Generalization Association in Use Cases
Problem
You have common behavior among use cases and want to factor
this out.
Solution
The generalization association among use cases factors out
common behavior. The child use cases inherit the behavior and
meaning of the parent use case and add or override some
behavior.
Example
Consider the use case “ValidateUser”, responsible for verifying
the identity of the user. The customer might require two
realizations: “CheckPassword” and “CheckFingerprint”
CheckPassword
Parent ValidateUser
Child
Case
CheckFingerprint Use Case
Use-Case Experts advise to Keep Things Simple
and Prefer the include Relationship
NextGen POS
Process Sale
Cashier
«include» «include» «actor»
Accounting
«include» System
Handle Returns
Manage Users
...
21
Case Study
27
Walkthrough task
28
Walkthrough task
29
Walkthrough task
Choose Add
Diagram option
30
Walkthrough task
31
Walkthrough task
32
Walkthrough task
33
Walkthrough task
34
Walkthrough task
35
Walkthrough task
36
Walkthrough task
37
Walkthrough task
38
Lab Tasks
39
Unseen task
40