Here I have this class diagram:
Here are the things that I don't understand:
Order
- OrderDetail
an aggregation? Shouldn't it just be an association, since it will have a List<OrderDetail>
like:public Order{
public DateTime date;
public Status status;
public List<OrderDetail> orderDetails;
}
OrderDetail
- Item
a dependency? Shouldn't it be association since it has a reference to that Item
class?Reference for the diagram: http://sslabmcs12.weebly.com/resources1.html
shared aggregation
which has no defined semantics. See p. 110 of UML 2.5:Indicates that the Property has shared aggregation semantics. Precise semantics of shared aggregation varies by application area and modeler.
So you best ask the diagram author about his intentions.
OrderDetail
can see Item
but not vice versa. A fact that could better be expressed by using role names only at one side. E.g. placing item
only on the right hand side and nothing to the left.What can we learn? UML is about communication!