Lecture 6 Collaboration Diagrams

Lecture 6 Collaboration Diagrams - Lecture 6: Collaboration...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright W. Howden 1 Lecture 6: Collaboration Diagrams
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Context - 1 Interaction sequence diagrams show: interactions of actors with the whole system (via the GUI/View layer/subsystem) interactions between subsystems illustrates how the GUI/View sends messages to other subsystems, and how they cooperate to perform some responsibility Copyright W. Howden 2
Background image of page 2
Context - 2 Messages received by subsystems in our design, messages received by the interface class for a subsystem corresponds to a method in the interface class (i.e. an instance of it) being executed corresponds to a task/request/event to which the subsystem must respond Copyright W. Howden 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Context - 3 Subsystem responses for each request, we have to design how the subsystem will respond creation of new subsystem classes to fulfill those responsibilities design for change design for intellectual manageability use design patterns and basic design patterns Copyright W. Howden 4
Background image of page 4
Copyright W. Howden 5 Collaboration Diagrams Use for subsystem and class design Will use to show event responses Event receiving a message how should the entity (e.g. subsystem/subsystem- interface) react to this? Diagrams will show auxiliary objects that we will create as part of the design leads to definition of new subsystem classes
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright W. Howden 6 Collaboration Diagram Components Objects Messages One object sends a message to another message Sequencing of messages various notations can be used here
Background image of page 6
Copyright W. Howden 7 2b: [userName=/ name] result :="Not logged on" 2a: [userName==name] memberData = getMemberData(userName) 1: userName = getUserName() result = setMemberData (name, dateeData) :String dL : DomainLogic dB : DataBase logOn : LogOn memberData : MemberData setDateeData(dateeData) Domain (Business) Logic subsystem updates a member's data
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright W. Howden 8 Message Sequence Notation Don’t number first message, we are showing how the object responds to this initial event Complicated situations: Conditional branching Nesting of (sub) operations Compound conditionals
Background image of page 8
Copyright W. Howden 9 Notation: Conditionals Alternative choices of message flows 1. Precede messages with constraints/guards E.g. [userName == name] ……. 2. Use lettered notation to indicate alternative message flows E.g. 2a, 2b; 3a, 3b in the example
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright W. Howden 10 Conditionals Example Used to indicate choices based on specified conditions. Either 1a or 1b is done, then 2 is done Object1 Object2 Object3 1 a : [ c o n d ] m ( ) 1b:[not cond] m2() Object4 2 3 Object5
Background image of page 10
Copyright W. Howden 11 Nesting and Sub-Operations Nested inside the response to message m1, is the sending of messages m2 then m3, done before “returning” from m1 Object1 Object2 Object3 Object4 1: m1() 1.1: m2() 1.2: m3() Object5
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright W. Howden
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/07/2011 for the course CSE 111 taught by Professor Howden during the Spring '07 term at UCSD.

Page1 / 52

Lecture 6 Collaboration Diagrams - Lecture 6: Collaboration...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online