Considerer this:
As far as I know in case 1 a
is related to b
, and a
is aware of b
so a
is able to send messages to b
, but b
is not aware of a
so b
is not able to send messages to a
.
In the other hand, in case 2 a
is related to b
, and both of them are aware of each other, both of them are able to send messages to the other.
But my question is what about that when the relationship is not association but aggregation? Could an aggregation relationship have bidirectional navegability in UML so both instances are aware of each other?
In case a
owns b
, consequently a
is aware of b
. (in other words a
is able to send messages to b
). but what about the other way around, does b
is aware of a
? or does this could never be the case? or this is just not specified in the diagram and this could be both ways? and, in case b
has to be aware of a
how would that be expressed(I've never seen an aggregation line with an arrowhead in the other end)?
does all of this applies in the same way for composition?
Another thing slightly related to this I Was wondering, could a non bi-directional association have two roles?
As far as I know this could not be possible because a non bi-directional relationship is a relation when just one of the related instances is aware of the other, and a role means how an instance perceive another one, so we need that both instances are aware of each other to be able to have two roles, is this correct?