0% found this document useful (0 votes)
18 views20 pages

Week 6

The document provides an overview of use case diagrams in software engineering, detailing their purpose in capturing user interactions and functional requirements of a system. It explains the relationships between actors and use cases, including includes, extends, and generalization dependencies. Additionally, it introduces sequence diagrams and system sequence diagrams, illustrating their role in modeling object interactions and deriving from use cases.

Uploaded by

XEON
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)
18 views20 pages

Week 6

The document provides an overview of use case diagrams in software engineering, detailing their purpose in capturing user interactions and functional requirements of a system. It explains the relationships between actors and use cases, including includes, extends, and generalization dependencies. Additionally, it introduces sequence diagrams and system sequence diagrams, illustrating their role in modeling object interactions and deriving from use cases.

Uploaded by

XEON
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/ 20

Software Engineering

More UML Diagrams


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
Coming up: Example
2
Use Case Diagram
Example Use Case Diagram

Coming up: Use Case


3
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
Coming up: Actors
4
Relationships Between Actors
• Actors can be related by
generalization/specialization
• Actors are classifiers (not individual
users)
Student i se
erw
ot h
us ..
bvio
y o t
Graduate ve kip i
r
Student hen s
s w
thi
Do

Coming up: Use Case5


Relationships
Use Case Relationships
Includes

Extends

Generalization

After a while you realize extends (from basic to the derived) and
generalization (from specialized to the general) are not too different.
Just know generalization and includes… forget about extends (the
difference is only in intent) Coming up: Use-Case6
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

Coming up: Use-Case7


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 Authorized


a class taken more Staff Worker
than a year ago

Coming up: Use-Case8


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

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

Name behaviors as use


cases

Add relations (includes,


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

Be Patient… let them unfold Coming up: Benefits 10


of
Use Cases
Show system
Use cases for CS421
boundary

Show Actors
outside boundary

Use extend,
include, Typically one
generalization/spe diagram for your
cialization where project is sufficient
appropriate
Coming up: Use cases
11
for CS421
Define Use Cases

Use Case: Play a Dice Game


• Player requests to roll the dice. System
presents results. If the dice face value
totals seven, player wins; otherwise,
player loses.

Dr. Kivanc Dincer


12
Define a Domain Model
Fig. 1.3 Partial domain model (conceptual object model) of the dice game

Player Die
1 Rolls 2
name faceValue
1 2
Plays
1

DiceGame
1 Includes

Domain model shows the noteworthy domain concepts as objects, their


attributes, and associations.
Dr. Kivanc Dincer 13
What is a Sequence Diagram?
• Sequence Diagram – shows object interactions
– Contains 2 or more objects
• Some objects are static (shown in boxes at the top)
• Some objects are created dynamically (shown in boxes
lower in the diagram)
– Contains each object’s lifeline (shown as a dashed line
extending down from the objects’ boxes)
– Show messages passed from one object to another, and the
conditions which trigger messages to be sent
– Show self-delegations (messages sent from an object to
itself)
– Show returns from messages

14
Sequence Diagrams - Notation

15
Sequence Diagrams – Example 1 of 2
Concurrent Processes
Activations - show when a method
is active – either executing or waiting
for a subroutine to return
Asynchronous Message – (half
arrow) a message which does not
block the caller, allowing the caller to
carry on with its own processing;
asynchronous messages can:
Create a new thread
Create a new object
Communicate with a thread
that is already running
Deletion – an object deletes itself
Synchronous Message – (full
arrow) a message that blocks the
caller
16
Sequence Diagrams – Example 2 of 2

17
SSD for Process Sale
scenario

18
System Sequence Diagrams and Use Cases
• System Sequence Diagram is generated from inspection of a use
case.
• Constructing a systems sequence diagram from a use case-
• 1.Draw a line representing the system as a black box.
• 2.Identify each actor that directly operates on the system. Draw
a line for each such actor.

• 3.From the use case, typical course of events text, identify the
system (external) events that each actor generates. They will
correspond to an entry in the right hand side of the typical use
case. Illustrate them on the diagram.

19
SSDs are derived from use
cases.

20

You might also like