Open Punpun1643 opened 2 years ago
@Punpun1643 Partial answer (leaving the rest for discussion): composition (i.e., the diamond) and navigability (i.e., the arrowhead) are two independent things.
I think its also possible to have the sub-activities keep a reference to the parent-activity? So because it is not specified as to who would be keeping the reference, the navigability is unknown, and it would be safer to just leave out the arrowhead (in my opinion).
I'm wondering if showing composition in the class diagram with an arrowhead is considered correct and is the same thing as showing the one without an arrowhead?
For example, in this diagram in the sample answer from the Practice Exam, I initially drew composition with an arrowhead because I thought that an Activity object also has reference to its sub-activities.
Another example is in the week 8 tutorial where the composition is shown with an arrowhead:![3C55608C-96A3-4DE6-A804-5EDB57311BC9_4_5005_c](https://user-images.githubusercontent.com/60144099/166194898-0ddf8bf3-1aa7-4aae-a6c9-de5dc977d107.jpeg)
However, in the module website composition should only be shown like this:![095E3F01-9489-449B-AC09-0F02875AC008_4_5005_c](https://user-images.githubusercontent.com/60144099/166195871-e5ff8610-d2b6-434d-bb4e-bbf446466368.jpeg)
I'm also a little conflicted because I think showing composition already implies that Whole has a reference to Part?