nus-cs2103-AY2021S1 / forum

20 stars 2 forks source link

Textbook Activity Diagram diamond shapes correct notation? #531

Closed qwoprocks closed 3 years ago

qwoprocks commented 3 years ago

image

With reference to the image above (found on pg 132/153 of the pdf ver of the textbook), can I ask if the merging of paths before the "Wrap up" node is proper notation? Or do we need to place a merge node there?

Also, for indication of 3 paths or more at a branch node, is the notation shown in the picture (the branch node with the conditions [one], [more], [none]) correct? Or should we be splitting it into three branch nodes? (perhaps as follows: 1: [none], [else] 2: [one], [else] 3: [more], [else])

Thank you in advance.

nicktohzyu commented 3 years ago

you can have multiple branches from one branch node. no idea how to do more than 3 outgoing tho.

textbook states that merge node is optional, though i'm not sure if we should join the paths this way or instead have both paths go to wrap up

tankangliang commented 3 years ago

There's another image here which might be helpful. One of the exercises has this

image

as "Correct. There can be more than two alternate paths" and they do not have to come out from different points of the diamond.

qwoprocks commented 3 years ago

Thanks @tankangliang and @nicktohzyu!!