Upload
howard-boyd
View
212
Download
0
Embed Size (px)
Citation preview
What is the purpose of sequence diagram ?
• The sequence diagram is used primarily to show the interactions between objects in the sequential order that those interactions occur.
• Developers think sequence diagrams were meant exclusively for them :-)
• Business staff can find sequence diagrams useful to communicate how the business currently works by showing how various business objects interact.
• A business-level sequence diagram can be used as a requirements document.
• During the requirements phase use cases are often refined into one or more sequence diagrams.
Notation 2• Sending a message/methos to another object• The name is placed above the arrowed line• And represents an operation/method that the
receiving object's class implements.
Notation 3• Return messages – optional• The use of return messages depends on the
level of detail/abstraction• Return value is placed above dotted line
Notation 4• Sending a message to itself• the model draws attention to the fact that this
processing takes place in the system object.
Combined fragments (alternatives, options, and loops)
• A combined fragment is used to group sets of messages together to show conditional flow in a sequence diagram.
• Alternatives - classic "if then else" logic• Options - a simple "if then" without “else”• Loops – a repetitive sequence
Option• used to model a
sequence that, given a certain condition, will occur; otherwise, the sequence does not occur.
Loops• does not require guard condition be placed on it• a guard can have two special conditions• Minint = 1, Maxint = 5
Breaks• most commonly used to model exception handling• cause the exiting of an enclosing interaction's
sequence. • In cases where a break is part of combined fragment,
then only that fragment is exited.
Sequence(SD) vs. activity (AD)?
• AD mainly represent process flows.• SD mainly represent step by step ordered in
time interaction between different objects.• AD also repersents an object role in workflow
but level of repersenation is not dynamic like SD.
• Example: Object lifeline and detailed sequence of interaction