0% found this document useful (0 votes)
23 views17 pages

1 BasicUseCases

Uploaded by

wdxyfxdxpz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views17 pages

1 BasicUseCases

Uploaded by

wdxyfxdxpz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Use Cases

Model Namespace
Element
Classifier Generalizable
Element Constraint
name
isRoot visibility
isSpecification Body

SWE 215

1
Introduction
 Use Case: “... a typical interaction between a
user and a computer system”, Booch
– Here, “user” is anything that needs or invokes the functionality
of the system
– “Computer system” is the system being modeled
 Use cases capture and document the user-
visible functionality of a system (functional
requirements)
 Use cases capture how the system will benefit
the user
 Each use case represents a discrete goal for
the user
2
Coming up: Example Use Case Diagram
Example Use Case Diagram

3
Coming up: Use Case Diagrams
Use Case Diagrams
 Use Case Diagrams provide a visual way to
document user goals and explore possible
functionality
 Three primary modeling components:
– Actors – Relationships between
– Use Cases use cases
Record class grades Review Transcripts

Teacher
Authorized Student
Staff Worker
4
Coming up: Actors
User Goals
 User Goals are statements that represent
what the users need to accomplish,
independent of specific software features
 Examples of user goals for a Student
Records Management System
– Ensure that a student’s records reflects courses
taken and grades received in those courses
– Allow only authorized faculty and staff to update
student records
– Ensure that students can obtain copies of their own
(and only their) records in a timely manner

5
Actors
 Actors are people or external systems that
need to interact with our system
Finding Actors

 Who or what will use the main functionality of the system?


 Who or what will provide input to this system?
 Who or what will use output from this system?
 Who will need support from the system to do their work?
 Are there any other software systems with which this one
needs to interact
 Are there any hardware devices used or controlled by this
system?

6
Coming up: Relationships Between Actors
Actors
 An actor can be a role that a user plays with
respect to the system
 A single person may play different roles
 A single actor may perform many use cases
 A use case may be performed by many actors
 Show external systems as actors only when
they are the ones who need a use case

7
End of presentation
Relationships Between Actors
 Actors can be related by
generalization/specialization
 Actors are classifiers (not individual users)

Student
s..
io u
obv
ery ip it
n v sk
Graduate
he se
Student
s w rwi
t hi the
Do o

8
Coming up: Use Case Relationships
Use Case Relationships

Includes

Extends

Generalization

9
Coming up: Use-Case Relationships
Use-Case Relationships
 Includes Dependency: Defines how one
use case can invoke behavior defined by
another use case

Alter Student Grade

<<includes>>

Record Grades for a


Teacher
Section

10
Coming up: Use-Case Relationships
Use-Case Relationships
 Extends dependency: defines a use-case
that is a variation of another, usually for
handling an abnormal situation

Alter Student Grade

<<extends>>

Alter student grade for a Authorized


class taken more than a Staff Worker
year ago

11
Coming up: Use-Case Relations
Use-Case Relations
 Generalization: Defines one use case as a generalization
of another. Replaces generic functionality with alternate
implementation

Alter Student Grade

Alter Student Grade for


Teacher
a Graduate Course

12
Coming up: Documenting Use Cases
Documenting Use Cases
List Actors What is system response
to external event? What
is the user’s goal?
List External Determine
Events expected behavior

Name behaviors as
use cases

Add relations
Document use case
(includes, extends,
(basic flow,
generalization)
alternate, exception)

13
Coming up: Benefits of Use Cases
Benefits of Use Cases
 Use cases diagrams capture user-visible functions

 Identifying actors help capture who needs the system


functionality

 Relationships between use cases document


opportunities for reuse

 Use cases provide a basis planning and scheduling


incremental development

 Use cases can provide a basis for system testing


14
Coming up: In Class Exercise
Use cases Show system
boundary

Show Actors
outside
boundary

Use extend,
include, Typically one
generalization/spe
cialization where diagram for
appropriate your project
15
Coming up: Use cases for CS421
is sufficient
Questions
 Who might be interested in reviewing or using use
case diagrams?
 When in the development life cycle should we employ
use cases?
 What do use cases have to do with object-orientation?
 What level of use-case granularity is best?
 How many use cases are enough?
 Can other modeling activities help in discovering use
cases?
 When in the development life cycle do we stop
referring to or refining the use cases?
 What should the text description of use case contain?
16
Coming up:
In Class Exercise
 Let’s create a use case diagram for

– iPod
– Television set
– Elevator
– ATM
– Online Scrabble game
– Word Processor

17
Coming up: Use cases for CS421

You might also like