Hi all, While preparing part II, I came across this question with regard to composision. UML Distilled (page 86, figure 6-6 in my copy) has a composition relationship between Point and Polygon, and explains that "deleting a Polygon would cause its associated Points to be deleted...". Reviewing Cade's study guide and his class diagram in the case study (page 169, figure 8-6), I would have tought there would be a similar relationship between Order and LineItem. Would removing an Order not also remove the LineItems associated with it? If not composision, would this not at least be aggregation? Meaning that an Order it made up of LineItems, but that a LineItem can exist after an Order is deleted (to preserve the relationship between LineItem and Product)? Just trying to get a better handle on this so I get my relationships correct in my asssignment. Thanks for any help. Art
Joined: Mar 17, 2000
You answered the question yourself. If deleting the order does not delete the LineItems, then it is not a composition but an aggregation. But you have to understand, this comes from the business requiremnets. ie., whether or not the relationship is a composition( or an aggregation) is driven by the business requirements and not the other way. Hope that helps,
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).