Use-Case Model: Drawing System Sequence Diagrams
Use-Case Model: Drawing System Sequence Diagrams
Use-Case Model: Drawing System Sequence Diagrams
Sequence Diagrams\
System Behavior and
UML Sequence Diagrams
• It is useful to investigate and define the
behavior of the software as a “black box”.
• System behavior is a description of what the
system does (without an explanation of how it
does it).
• Use cases describe how external actors
interact with the software system. During this
interaction, an actor generates events.
• A request event initiates an operation upon
the system.
System Behavior and
System Sequence Diagrams (SSDs)
• A sequence diagram is a picture that
shows, for a particular scenario of a use
case, the events that external actors
generate, their order, and possible inter-
system events.
• All systems are treated as a black box; the
diagram places emphasis on events that
cross the system boundary from actors to
systems.
SSDs for Process Sale Scenario
SSD and Use Cases
Naming System Events and
Operations
• The set of all required system operations
is determined by identifying the system
events.
– makeNewSale()
– addLineItem(itemID, quantity)
– endSale()
– makePayment(amount)
Use-Case Model: Adding Detail
with Operation Contracts
Contracts
• Contracts are documents that describe
system behavior.
• Contracts may be defined for system
operations.
– Operations that the system (as a black box) offers
in its public interface to handle incoming system
events.
• The entire set of system operations across all
use cases, defines the public system
interface.
System Operations and the System
Interface
• In the UML the system as a whole can be
represented as a class.
• Contracts are written for each system
operation to describe its behavior.
Example Contract: addLineItem