nus-cs2103-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Missing Composition for Day in DG for Model.java class diagram #1203

Open nus-pe-bot opened 4 months ago

nus-pe-bot commented 4 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.


Screenshot 2024-04-19 at 5.22.40 PM.png

The lower part of the diagram marks several composition relationships to the Person object stemming from its prefixes. However, the day prefix does not seem to have the composition relationship. This seems to be an error in the documentation and can be inspected to fix.


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

JerryO3 commented 4 months ago

Team's Response

In fact, we modified the diagram by removing the composition relationship to better model that Days can exist even when the person who is available on that day is deleted from the contact list. This differs from the other classes such as phone, email etc. that should not exist independent of the person it identifies.

From the textbook,

image.png

Which is not appropriate to describe the association between Days and person in FriendFolio. (We do not create/delete a new Day object when we add to a person's Days available, and we do not delete the Day object when the person who is available on that day is deleted [the day object is referenced by other persons available on that day])

Duplicate status (if any):

--