nus-cs2103-AY2324S2 / forum

16 stars 0 forks source link

Week 5 Lecture Briefing Multiplicity #1062

Open gavin331 opened 5 months ago

gavin331 commented 5 months ago

image The lecture says that this is false because there is a missing arrow (shown in blue). Does the navigability change the way with how we interpret multiplicities? Like since navigability is optional and if I remove all the navigability in this diagram (changing to all solid lines), then wouldn't it be true?

ThatGirlJam commented 5 months ago

I suppose that would be true if the original class diagram didn't have the navigability as well. But I guess since the original class diagram does have it, it would match better with the navigability instead of just solid lines.

damithc commented 5 months ago

@gavin331

  1. The line is the association. The arrowhead is the navigability. Don't refer to the entire arrow as navigability.
  2. In this class diagram, 1..* means every Bar object must be pointed to by at least 1 Bar object. In the object diagram, there is one Bar object that is not pointed to by a Bar object. Hence, it doesn't match with the class diagram.