01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Session 13—Modeling the Static View: The Object Diagram 145<br />

Test case 3<br />

Is there evidence that a CustomProduct may be configured into another CustomProduct<br />

Figure 13-7 shows that the test case revealed the need to support aggregation between<br />

one CustomProduct and other CustomProducts. For example, a component stereo system,<br />

consisting of five VendorProducts, could become part of a home entertainment center.<br />

802: CustomProduct<br />

5467: Shipment<br />

775: CustomProduct<br />

456: CustomProduct<br />

312: CustomProduct<br />

0..*<br />

VendorProduct<br />

0..1<br />

Shipment<br />

0..1<br />

2..*<br />

0..1<br />

CustomProduct<br />

0..*<br />

0..*<br />

0..1<br />

Figure 13-7<br />

(bottom)<br />

The Object diagram (top) and the resulting updated Class diagram<br />

Test case 4<br />

Are there any common characteristics among the objects used to configure CustomProduct<br />

Figure 13-8 shows that both CustomProducts and VendorProducts can be part of a<br />

CustomProduct. This common property can be generalized. That is, you can create a generalized<br />

class to contain what the two types of products have in common. The new aggregation<br />

association says that any type of Product (VendorProduct or CustomProduct) may participate<br />

in the assembly of a CustomProduct.<br />

Both classes also define the same type of association with Shipment. This too can be<br />

moved up to the generalized class. A single association from Shipment to Product says that<br />

any type of Product (VendorProduct or CustomProduct) may be shipped.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!