group 2 work what is sequence diagram ? what is sequence diagram ? why do we use it ? why do we use...

8
Group 2 work Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation of SD? 15.7 15.8 15.9 diagrams exploration 15.7 15.8 15.9 diagrams exploration Group members: Group members: Edgaras, Ronaldas, Julius and Andrius Edgaras, Ronaldas, Julius and Andrius

Upload: austen-parker

Post on 03-Jan-2016

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

Group 2 workGroup 2 work

What is sequence diagram ?What is sequence diagram ? Why do we use it ?Why do we use it ? What is basic notation of SD?What is basic notation of SD? 15.7 15.8 15.9 diagrams exploration15.7 15.8 15.9 diagrams exploration

Group members:Group members:Edgaras, Ronaldas, Julius and AndriusEdgaras, Ronaldas, Julius and Andrius

Page 2: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

What is Sequence diagrams?What is Sequence diagrams?

A sequence diagram (SD) is a picture A sequence diagram (SD) is a picture that shows, for one particular scenario that shows, for one particular scenario of a use case, the events that external of a use case, the events that external actors generate their order, and inter-actors generate their order, and inter-system events.system events.

Also SD is an interaction diagram that Also SD is an interaction diagram that details how operations are carried out, details how operations are carried out, what messages are sent.what messages are sent.

Page 3: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

What is Sequence diagrams?What is Sequence diagrams?

SD are organized according to time. SD are organized according to time.

The time progresses as you go down The time progresses as you go down the page. the page.

The objects involved in the operation The objects involved in the operation are listed from left to right according are listed from left to right according to when they take part in the message to when they take part in the message sequence.sequence.

Page 4: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

Why do we use SD?Why do we use SD? Because we have to design the software to handle Because we have to design the software to handle

these events (from the mouse, keyboard, another these events (from the mouse, keyboard, another system, …) and execute a response. Basically a system, …) and execute a response. Basically a software system reacts the three things:software system reacts the three things:

1) External events from actors (humans or 1) External events from actors (humans or computers).computers).

For example, when a cashier enters an item’s Id, the For example, when a cashier enters an item’s Id, the cashier is requesting the POS system to record that item’s cashier is requesting the POS system to record that item’s sale (The enterItem event). That event initiates an sale (The enterItem event). That event initiates an operation upon the system. The use case text implies the operation upon the system. The use case text implies the enterItem event, and the SSD makes it concrete and enterItem event, and the SSD makes it concrete and explicit.explicit.

2) Timer events.2) Timer events. 3) Faults or exceptions (which are often from 3) Faults or exceptions (which are often from

external sources).external sources).

Page 5: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

What is the basic notation of What is the basic notation of sequence diagrams?sequence diagrams?

A sequence diagram depicts the sequence of actions A sequence diagram depicts the sequence of actions that accrue in a system. The invocation methods in that accrue in a system. The invocation methods in each object, and the order in which the invocation each object, and the order in which the invocation accurse is captured in a SD. This makes the SD a accurse is captured in a SD. This makes the SD a very useful tool to easily represent the dynamic very useful tool to easily represent the dynamic behavior of the system. behavior of the system.

A SD is two – dimensional in nature. An the A SD is two – dimensional in nature. An the horizontal axis, it show life of the object that it horizontal axis, it show life of the object that it represents while on the vertical axis it shows the represents while on the vertical axis it shows the System of the creation or invocation of these System of the creation or invocation of these objects.objects.

Because it uses class name and object reference the Because it uses class name and object reference the SD is very useful in elaboration and detailing the SD is very useful in elaboration and detailing the dynamic design and the sequence and origin of dynamic design and the sequence and origin of invocation of objects. The SD is one of most widely invocation of objects. The SD is one of most widely used dynamic diagrams.used dynamic diagrams.

Page 6: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

15.7 diagram15.7 diagram

Life line boxes and life lines and messages.Life line boxes and life lines and messages.Situation :Situation :Register and sale.Register and sale.Diagram shows how register and sale classes change they Diagram shows how register and sale classes change they

informationinformation

: Register : Sale

doA

doB

doX

doC

doD

typical sychronous message shown with a filled-arrow line

a found message whose sender will not be specified

execution specification bar indicates focus of control

Page 7: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

Diagram 15.8Diagram 15.8

Diagram shows 2 ways a return result Diagram shows 2 ways a return result from a message. from a message.

: Register : Sale

d1 = getDate

getDate

doX

aDate

Page 8: Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation

Diagram 15.9Diagram 15.9

This diagram This diagram shows message shows message being sent from an being sent from an object to itself by object to itself by using a nested using a nested activation baractivation bar

: Register

doX

clear