Lecture 5 Collaboration Diagrams

Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition)

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

View Full Document Right Arrow Icon
Copyright W. Howden 1 Lecture 5: 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
Copyright W. Howden 2 Collaboration Diagrams • Used for design of: components, object, subsystems • Diagrams show entity event responses • Event receiving a message
Background image of page 2
Copyright W. Howden 3 Collaboration Diagram Components • Objects • Messages – One object sends a message to another message • Collection of interacting objects, as they accomplish some kind of functionality
Background image of page 3

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

View Full DocumentRight Arrow Icon
Copyright W. Howden 4 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 4
Copyright W. Howden 5 Message Sequence Notation • Multiple schemes, better depending on situation. Will use modified decimal 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 5

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

View Full DocumentRight Arrow Icon
Copyright W. Howden 6 Notation: Conditionals • Alternative choices of message flows • Precede messages with constraints/guards – E.g. [userName == name] ……. • Use lettered notation to indicate alternative message flows – E.g. 1a, 1b
Background image of page 6
Copyright W. Howden 7 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 7

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

View Full DocumentRight Arrow Icon
Copyright W. Howden 8 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 8
Copyright W. Howden 9 Compound Conditions • How to number structures such as if a then if b then {c, d} else e else g • Nested numbering already used up for sub- operation nesting so just repeat the condition somehow
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 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 10
Copyright W. Howden 11
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/11/2008 for the course CSE 111 taught by Professor Howden during the Fall '07 term at UCSD.

Page1 / 41

Lecture 5 Collaboration Diagrams - Lecture 5: Collaboration...

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

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