meeting -*- Outline -*- * Interaction Diagram Notation (Larman Ch 15, Fowler Ch 5) This chapter is just notational reference, have them read it, but don't talk about all of the details in class. Instead, explain most of the notation as you describe the design patterns in the next chapter. ** preview ------------------------------------------ INTERACTION DIAGRAMS (Larman Ch 15, Fowler Ch. 5) Used to illustrate object designs. Types: - sequence diagrams simpler, clearly shows time sequence easier for computers to draw - collaboration diagrams good for branching, iteration best for hand drawing ------------------------------------------ ** notational highlights ------------------------------------------ NOTATIONAL GOTCHAS Things to watch out for: instances are underlined start with a colon |-----------| | :PMSD | (should be underlined) |-----------| classes are not underlined, no colon |-----------| | Math | (not underlined) |-----------| multiobjects (collections) have double boxes |-----------| |-----------| | | :File |-| (should be underlined) |-----------| ------------------------------------------ ** Example collaboration diagram ------------------------------------------ EXAMPLE COLLABORATION DIAGRAM (15.2) | | makePayment(cashTendered) | | | v | |-----------| | :Register | |-----------| | | 1: makePayment(cashTendered) | | | v | |-----------| | :Sale | |-----------| | | | 1.1: create(cashTendered) | | | v | |------------| | :Payment | |------------| ------------------------------------------ Point out that - the first message doesn't have a number (and the sender isn't identified in this case) - parameters are shown on messages - a small arrow indicates the direction of the message - internal messages are numbered sequentially - messages sent "within" the processing of another message are given subsequence numbers (1.1, 1.2, 1.2.1, etc.) - multiple messages, and messages sent both ways can flow along the same link line - creation is indicated with a "create" message