nus-cs2103-AY2021S1 / forum

20 stars 2 forks source link

The word contains in UML #504

Closed seanjyjy closed 3 years ago

seanjyjy commented 3 years ago

Screenshot 2020-11-30 at 9 04 33 PM

Hi @damithc, In this video, you stated that since the word used is contains, hence it refers to an aggregation relationship. However, in the previous video regarding Action, task, history, the word used is also contains but it is a composition relationship. I understand that with the additional details we had from the Class diagram we should be able to deduce the composition, however, isn't this a contradiction from what you stated?

So just want to clarify, if the word contains is used without any other extra "information", then we should take it as aggregation but with some other information that somewhat supports composition, we should take composition?

damithc commented 3 years ago

Sorry, missed this earlier. Ideally, I should have used 'consisting' in the other question you refer to. Then again, the other question uses 'contains' in the description for the object diagram. The decision to use composition or aggregation is made in the class diagram. Anyway, in borderline cases, both choices will be given marks.