Communication diagram Introduction

DineeshaSuraweera 3,566 views 14 slides Jun 08, 2016
Slide 1
Slide 1 of 14
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14

About This Presentation

Communication diagram Introduction


Slide Content

Communication Diagrams Introduction

Introduction A communication diagram, formerly called a collaboration diagram, is an interaction diagram that shows similar information to sequence diagrams but its primary focus is on object relationships. Communication Diagram is also used to model the dynamic behavior of the use case. It is more focused on showing the collaboration of objects rather than the time sequence.

Purpose Very useful for visualizing the relationship between objects collaborating to perform a particular task. Model flow control Illustrate coordination of object structure and control.

notations Return Message

Collaborations Actor Life Line Actors Each Actor is named and has a role One actor will be the initiator of the use case Objects Each object in the collaboration is named and has its class specified Not all classes need to appear There may be more than one object of a class Links Links connect objects and actors and are instances of associations Each link corresponds to an association in the class diagram

On communication diagrams, objects are shown with association connectors between them. Messages are added to the associations and show as short arrows pointing in the direction of the message flow. The sequence of messages is shown through a numbering scheme.

Messages In order to maintain the ordering of messages in a free-form diagram, messages are labeled with a chronological number and placed near the link that message is sent over. Reading involves starting at message 1.0, and following the messages from object to object. [sequenceNumber:] methodName(param) [: returnValue] 1.2 :getName(string) :firstName

Communication Diagram for Online Bookshop

C ommunication diagram For Online Shopping System Scenario: Customer login to his/her account and order the items/products that he/her wants and finally do the payments. Analyzing functional requirements and Identifying the main flow Customer login-Using customer ID & Password Order the items and get the prices Do payments

Requirement 1:Customer login Objects/Classes : Customer, account Message: login(id,pwd) Requirement 2:Order the items and get the prices Objects/Classes : Item,Price Message: order item,get price Requirement 3:Do payments Objects/Classes : Item Message: do payment

account:Customer Item 1:order item() Price 2:get price() Payment 3:do payment() pay:Master 3.1[if master ] pay by Master() pay:Visa 3.2[if visa] pay by visa() Customer :login(id,pwd)

Communication Diagrams.. Furthermore….. Automatically generated test cases based on communication diagrams…!!! Represent messages passed between objects and their sequences. Can provide data flow and control flow information. Data flow and control flow info have significant bearing on test case generation With communication diagrams it’s possible to generate cluster level test cases even before any code written...

Communication Diagram Make tree Select predicate Transform predicate Generate test data Test cases

Thank You !