Download presentation
Presentation is loading. Please wait.
1
Chapter 16
2
Fig. 16.1
3
Fig. 16.2 Note: If Sale references nothing then the only thing it is associated with is what references it Note: association name is missing since role name of Sale is used as instance variable name in Register Note: Why no arrow?
4
Fig. 16.3 Note: Use attribute text when the data type identity is not important, eg primitives. visible
5
Fig. 16.4
6
Fig. 16.5
7
public class Register { private int id; private Sale currentSale; private Store: location;... }
8
Fig. 16.6 property string
9
Fig. 16.7 return type is also typical Full Syntax: visibility name (param list):return-type {property-string} property-string: exceptions, abstract, friend, etc. declarationmethod
10
Fig. 16.8
11
Fig. 16.9 Dependency presence of coupling AClass foo():void > public void foo() { mSale.updatePriceFor(pd) } mSale 1
12
Kinds of Dependency -- having an attribute of supplier type -- sending a message to a supplier using an attribute, param, local variable global variable, static method -- receiving a parameter of a supplier type -- supplier is a supertype or interface Use a dependency line when no other structural line exists.
13
FooSystem runFinalize() doX() doX() calls System.runFinalize()
14
Fig. 16.11 Example: A factory “creates” an object of a separate class but has no other relationship to the object.
15
Fig. 16.12
16
Window1 > Timer > Timer Window3Clock3 either one
17
Fig. 16.13 Note: Author suggests not using general aggregation; only composition.
18
Fig. 16.14 Constraints constraint: { text between braces}
19
Fig. 16.15 Qualified Association qualifier is used to select a specific object from a larger set of objects
20
Fig. 16.16 Association Class model an association with attributes and operations
21
Fig. 16.17 Singleton
22
Fig. 16.18 Template Classes
23
Fig. 16.19 User Defined Compartments
24
Fig. 16.20 An active class is one controlling its own thread
25
Fig. 16.21 in Agile, these diagrams a re drawn in parallel
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.