Professional Documents
Culture Documents
Sequence Diagram P
Sequence Diagram P
PRATIK BHUSAL
What is Sequence Diagram ??????
• Sequence diagrams describe interactions among classes in terms of an exchange
of messages over time
• Object - this box shape represents a class, or object, in UML. They demonstrate
how an object will behave in the context of the system. Class attributes should
not be listed in this shape.
Activation boxes
• symbolized by a rectangle shape, an activation box represents the
time needed for an object to complete a task. The longer the task will
take, the longer the activation box becomes.
Actors
represented by a stick figure, actors are entities that are both
interactive with and external to the system.
Lifeline
a dashed vertical line that represents the passage of time as it extends
downward. Along with time, they represent the sequential events that
occur to an object during the charted process. Lifelines may begin with
a labeled rectangle shape or an actor symbol.
Object1
Messages -
• packets of information that are transmitted between objects. They
may reflect the start and execution of an operation, or the sending
and reception of a signal.
Kinds of Messages
UML defines four kinds of
messages:
Flat
Don’t know or don’t care
Synchronous Messages
Moving on to the
next step of the
scenario
We now have a
third object!
: Print Invoice : Customer : Sales Items : Invoice
Record
Print Total
So we continue!
So what have we done?
GetName( )
So we work
through the
messages and
apply
operations
: Print Invoice : Customer : Sales Items : Invoice
Record
GetName( )
PrintCustName( )
And so we
continue
: Print Invoice : Customer : Sales Items : Invoice
Record
GetName( )
PrintCustName( )
GetAddress( )
PrintCustAddress( )
GetUnbilledItems( )
PrintLines( )
PrintTotal( )
PrintTermsConditions( )
: user
Add objects
The first interaction is with the icon bar, which we can treat as an object
: icon bar
: user
Add message
The user talks to the icon bar
: icon bar
: user
The icon bar has some work to do.
It creates an email page.
: user
click send mail create
Now the user can see the email page and use it.
The next three steps are filling in the details on the email page
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
The user then clicks Send
: icon bar : email page
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
send
Now consider how to do the sending
: icon bar : email page : address book
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
send
look up email address
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
send
look up email address
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
send
look up email address
submit email
And if we think carefully, the email page always closes after the send.
: user
click send mail create
fill in to box
fill in subject box
fill in contents box
send
look up email address
submit email
close
Now we go through and change the messages to operations on
the object
: user
send mail( ) create
fill in to box
fill in subject box
fill in contents box
send
look up email address
submit email
close
And so on, all the way through
: user
send mail( ) create( )
enterTo( )
enterSubject( )
enterContents( )
send( )
getEmailAddress( )
submitEmail( )
close( )