Sunday, January 7, 2007 08:01 PM
...how does it matter in Java projects to use different UML symbols at design time?
Welcome to the real world, where UML diagrams are just for show and tell. (unless you're working at a wonderful place that has paid for, and actually uses, the whole Rational Unified Process, where code actually gets generated and maintained from the diagrams etc.
I think "in theory" (i.e. if this is a 'closed book exam' on what I remember of the UML 1 specs) that first of all, an 'association' is so generic it can cover any kind of situation where one classifier refers to or "uses" another somehow (and may go only one way with just one arrowhead, or both ways with 2 arrowheads). I think (?) 'aggregation' and 'composition' are more specific kinds of 'association' that go one way, not both ways.
I think the difference between 'aggregation' and 'composition' is that in one of them (I forget which) the parent/containing classifier really has nothing of its own beyond the constituent/contained elements (like a Java List, for instance), while in the other, the parent does have some significant state/attributes of its own.
I think (?) it's your judgment call, as the UML diagrammer, reflecting your opinion of the "significance" of the parent's own attributes?