UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 13—Modeling the Static View: The Object Diagram 143 0..* VendorProduct 0..1 Shipment 0..1 CustomProduct Figure 13-4 Initial Class diagram modeling products Figure 13-4 tells you that each Shipment may have zero or more VendorProducts and zero or more CustomProducts. Each type of Product may or may not have been shipped. The rest of this session steps through the construction of an Object diagram that models the set of test cases for the Product Class diagram in Figure 13-4. The construction process demonstrates the model elements of the Object diagram and how the Object diagram illustrates test cases. I’m going to go through this one step at a time. You may spot more problems with the original Class diagram than the current test case reveals. By the time I cover all the test cases, we should have found all the problems. If we don’t, just send me a nice letter with the corrections. Test case 1 A CustomProduct is created by assembling VendorProducts. VendorProducts 28, 38, and 72 create CustomProduct 425. Figure 13-5 shows how the Class diagram is changed to include the aggregation relationship between CustomProduct and VendorProduct. The change shows that a CustomProduct is created from one or more VendorProducts. But a VendorProduct doesn’t have to be used in a CustomProduct. Test case 2 0..* What is the minimum number of objects that make up a CustomProduct configuration After reviewing all the test data, we find that a CustomProduct must consist of at least two VendorProducts. Otherwise, there is no way to distinguish a CustomProduct from a VendorProduct.
144 Saturday Afternoon 28: VendorProduct 4321: Shipment 425: CustomProduct 38: VendorProduct 72: VendorProduct 0..* VendorProduct 0..1 Shipment 0..1 0..* 1..* 0..1 CustomProduct Figure 13-5 The Object diagram (top) for Test Case 1 and the resulting updated Class diagram (bottom) Figure 13-6 shows that the test case revealed the need to alter the minimum multiplicity for VendorProducts used to assemble a CustomProduct from 1 to 2. 4322: Shipment 426: CustomProduct 38: VendorProduct 47: VendorProduct 0..* VendorProduct 0..1 Shipment 0..1 0..* 2..* 0..1 CustomProduct Figure 13-6 The Object diagram (top) and the resulting updated Class diagram (bottom)
- Page 117 and 118: 94 Saturday Morning The Class diagr
- Page 119 and 120: 96 Saturday Morning Attribute visib
- Page 121 and 122: 98 Saturday Morning In a modeling t
- Page 123 and 124: 100 Saturday Morning Table 9-2 Cont
- Page 125 and 126: 102 Saturday Morning Operation comp
- Page 128 and 129: SESSION 10 The Class Diagram: Assoc
- Page 130 and 131: Session 10—The Class Diagram: Ass
- Page 132 and 133: Session 10—The Class Diagram: Ass
- Page 134 and 135: Session 10—The Class Diagram: Ass
- Page 136 and 137: Session 10—The Class Diagram: Ass
- Page 138 and 139: Part II — Saturday Morning Part R
- Page 140 and 141: SESSION 11 The Class Diagram: Aggre
- Page 142 and 143: Session 11—The Class Diagram: Agg
- Page 144 and 145: Session 11—The Class Diagram: Agg
- Page 146 and 147: Session 11—The Class Diagram: Agg
- Page 148 and 149: Session 11—The Class Diagram: Agg
- Page 150: Session 11—The Class Diagram: Agg
- Page 153 and 154: 130 Saturday Afternoon or not. Each
- Page 155 and 156: 132 Saturday Afternoon 5. “Any it
- Page 157 and 158: 134 Saturday Afternoon designed to
- Page 159 and 160: 136 Saturday Afternoon Table 12-3 T
- Page 161 and 162: 138 Saturday Afternoon REVIEW The C
- Page 163 and 164: 140 Saturday Afternoon Introducing
- Page 165: 142 Saturday Afternoon Table 13-1 C
- Page 169 and 170: 146 Saturday Afternoon 0..* VendorP
- Page 172 and 173: SESSION 14 Modeling the Functional
- Page 174 and 175: Session 14—Modeling the Functiona
- Page 176 and 177: Session 14—Modeling the Functiona
- Page 178: Session 14—Modeling the Functiona
- Page 181 and 182: 158 Saturday Afternoon Table 15-1 T
- Page 183 and 184: 160 Saturday Afternoon Figure 15-1
- Page 185 and 186: 162 Saturday Afternoon More product
- Page 187 and 188: 164 Saturday Afternoon start (merge
- Page 190 and 191: SESSION 16 Modeling the Dynamic Vie
- Page 192 and 193: Session 16—Modeling the Dynamic V
- Page 194 and 195: Session 16—Modeling the Dynamic V
- Page 196 and 197: Session 16—Modeling the Dynamic V
- Page 199 and 200: PART III # Saturday Afternoon Part
- Page 201 and 202: PART IV Saturday Evening Session 17
- Page 203 and 204: 180 Saturday Evening Scenario 1 Get
- Page 205 and 206: 182 Saturday Evening The next step
- Page 207 and 208: 184 Saturday Evening For Scenario 2
- Page 209 and 210: 186 Saturday Evening For subsequent
- Page 211 and 212: 188 Saturday Evening 6:addProduct(c
- Page 213 and 214: 190 Saturday Evening 7:addProduct(c
- Page 215 and 216: 192 Saturday Evening REVIEW The Col
144<br />
Saturday Afternoon<br />
28: VendorProduct<br />
4321: Shipment<br />
425: CustomProduct<br />
38: VendorProduct<br />
72: VendorProduct<br />
0..*<br />
VendorProduct<br />
0..1<br />
Shipment<br />
0..1<br />
0..*<br />
1..*<br />
0..1<br />
CustomProduct<br />
Figure 13-5 The Object diagram (top) for Test Case 1 and the resulting updated<br />
Class diagram (bottom)<br />
Figure 13-6 shows that the test case revealed the need to alter the minimum multiplicity<br />
for VendorProducts used to assemble a CustomProduct from 1 to 2.<br />
4322: Shipment<br />
426: CustomProduct<br />
38: VendorProduct<br />
47: VendorProduct<br />
0..*<br />
VendorProduct<br />
0..1<br />
Shipment<br />
0..1<br />
0..*<br />
2..*<br />
0..1<br />
CustomProduct<br />
Figure 13-6 The Object diagram (top) and the resulting updated Class<br />
diagram (bottom)