ISQS7338--DCD

ISQS7338--DCD - Designing with Interaction and Design Class...

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

View Full Document Right Arrow Icon
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman
Background image of page 1

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

View Full Document Right Arrow Icon
Two kinds of UML Interaction Diagrams l Sequence Diagrams: show object interactions arranged in time sequence, vertically l Communication Diagrams: show object interactions arranged as a flow of objects and their links to each other, numerically l Semantically equivalent, structurally different Sequence diagram emphasize time ordering Communication diagrams make object linkages explicit
Background image of page 2
Interaction Diagram notation Which would you expect to find most often in Interaction diagrams? What do you think of “:Sale instead of “aSale”? class instance named instance :Sale s1:Sale Sale
Background image of page 3

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

View Full Document Right Arrow Icon
Sequence diagram notation Figure 15.7 : Register : Sale doA doB doX doC doD typical sychronous message shown w ith a filled-arrow line a found message whose sender w ill not be specified execution specification bar indicates focus of control
Background image of page 4
What does vertical placement communicate? Figure 15.10 : Reg ister : Sa le makePaymen t(cashTendered) : Paymen t crea te(cashTendered) au thorize no te tha t new ly crea ted ob jects are p laced a t the ir tion "he igh t"
Background image of page 5

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

View Full Document Right Arrow Icon
Communication Diagram: makePayment Figure 15.4 What do the numbers communicate? What does a create message communicate? 1 : m ake Pay m en t(cash Ten de red ) 1 .1 : c rea te (cash ) :Reg is r :Sa le :Pay m t m akeP aym ) d irec tion o f m essa ge
Background image of page 6
Communication (aka Collaboration) diagrams l Objects are rectangular icons e.g., Order Entry Window, Order, etc. l Messages are arrows between icons e.g., prepare() l Numbers on messages indicate sequence Also spatial layout helps show flow l Which do you prefer: sequence or communication? l Fowler doesn’t use communication diagrams Show flow clearly, but awkward modeling alternatives l UML notation for control logic has changed in UML 2 but Fowler isn’t impressed
Background image of page 7

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

View Full Document Right Arrow Icon
Control logic in Interaction Diagrams l Conditional Message [ variable = value ] : message() Message is sent only if clause evaluates to true l Iteration (Looping) * [ i := 1. .N ] : message() “*” is required; [ . .. ] clause is optional l Communication diagrams add Seq. Numbers before conditional messages or loops
Background image of page 8
Logic in sequence diagrams: which notation do you prefer? Figure 15.13 Figure 15.14 ca lcu la te : Bar yy xx [ color = red ] opt : Foo [ co lor = red ] ca
Background image of page 9

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

View Full Document Right Arrow Icon
Logic in communication diagrams Figure 15.29 1 [ co lo r = red ] : ca lcu la te : Foo : Ba r me ssa ge 1 con d itiona l mes sag e , w ith tes t
Background image of page 10
Loops in sequence diagrams: which notation do you prefer?
Background image of page 11

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

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

{[ snackBarMessage ]}

Page1 / 29

ISQS7338--DCD - Designing with Interaction and Design Class...

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