nus-cs2103-AY2324S1 / pe-dev-response

0 stars 0 forks source link

Composition vs Association #4799

Open nus-se-script opened 9 months ago

nus-se-script commented 9 months ago

Note from the teaching team: This bug was reported during the Part II (Evaluating Documents) stage of the PE. You may reject this bug if it is not related to the quality of documentation.


In the UML diagram for Person

image.png

There is a mix of association and composition arrows. However, as per the code below:

image.png

They appear to all be composition.


[original: nus-cs2103-AY2324S1/pe-interim#3943] [original labels: severity.Low type.DocumentationBug]

Vanessamae23 commented 9 months ago

Team's Response

having it as part of code does not necessitate that it is composition. Composition means whole-part but we cannot afford to remove Group, Assignment, etc since they are not whole part and should still persist even if the person model is gone since it is also of another person model's model. So it is not supposed to be presented using composition.

Note that Tag, Comment, Group, Assignment may still exist even after the person is deleted, which forfeits the first condition for composition.

This is taken from the CS2103T course website:

Screenshot 2023-11-19 at 2.56.58 PM.png

Duplicate status (if any):

--