Open andrewtkh1 opened 2 years ago
The key thing is the word must. Since the multiplicity is not given as 1
, it can't be must. That is why it is incorrect.
Ahyeee, on a side note, is my understanding of association right? In the sense that association is always bi-directional, regardless of navigability. So for the above case, both Lid
& Container
are associated to one another. I just can't use the word "must".
Association is a connection between classes/objects. So yes, if there is an association between 2 classes then they are connected.
Your understanding in the original post is correct here. (both lid
& container
are associated with each other)
The direction aspect comes from navigability (or the arrowhead); so you can't say the association is bi-directional without considering navigability.
Hmm then does it mean that it is not right for me to say that Lid is associated with container
since the navigability is only 1 way?
No, your understanding is incorrect. Association => connection. So there is a connection between lid and container. Navigability => who holds the reference of the other; container holds the reference to lid.
Ahh so my statement Lid is associated with container
actually true as there's a line connecting?
yup
Okie Thank you!.
I'll leave this thread open for others to refer to.
Hi Sir,
Regarding the question below, why is option
c
wrong? From my understanding of association, bothlid
&container
are associated with each other, regardless of the navigability.