nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

[Spoiler: Practice Exam Part 1] Q6: Object Diagram to Class Diagrams #410

Closed Bisceto closed 1 year ago

Bisceto commented 1 year ago

Here is the question with the answers: image

I'll like to ask why the 4th option is not considered correct. Both the multiplicities between the chair and table are *, which includes the scenario that both multiplicities are 1 which follows the object diagram given.

Does this have something to do with the multiplicity of the door being 1 i.e every table should be associated with a single door but it is not reflected in the given object diagram?

gremmyz commented 1 year ago

Does this have something to do with the multiplicity of the door being 1 i.e every table should be associated with a single door but it is not reflected in the given object diagram?

Yup, I think this explanation is right, since multiplicity 1 means that it should be linked to one object at all times, it should be reflected as such in the OD.

ARPspoofing commented 1 year ago

Yes I think you are right as well. Option 4 means every Table must have a Door, which is not shown in the object diagram of the question.

damithc commented 1 year ago

Both @gremmyz @ARPspoofing are correct 👍

Bisceto commented 1 year ago

Thanks for the response everyone!