Open KendrickAng opened 4 years ago
Both are fine if the return is same. If the return value is different for the different alternatives, it needs to be the first one.
Also, the second picture has an activation bar not exceeding the alt block while the bar exceeds the alt block in the first picture. Which one do we follow?
It follows the meaning of the diagram. In the second case, the return is not part of the alternative branches in which case it should be outside of the alt box. As we put the return outside the box, the activation bar too has to extend to outside of the box.
May I ask how should we deal with the parameters of generate(boolean hasExisting)
executed in the past year question? hasExisting
is passed as a parameter but is not reflected in the outer arrow before the alt
box?
May I ask how should we deal with the parameters of
generate(boolean hasExisting)
executed in the past year question?hasExisting
is passed as a parameter but is not reflected in the outer arrow before thealt
box?
For context, can give a screenshot?
Am wondering the same thing. The generate(boolean hasExisting)
call is located in the first image, quoted below:
Should it be generate()
or generate(hasExisting)
?
Should it be
generate()
orgenerate(hasExisting)
?
Should be generate(hasExisting)
to be absolutely correct
Thank you Prof!
In the lecture going through the sequence diagram past year question, the sequence diagram was drawn to have one return arrow in each of the if and else parts of an "alt" block. However, for Q2 of the mock practice paper, only one return arrow was drawn outside the alt block. Both had return statements in each of the "if" and "else" parts. Which convention should we follow?
Also, the second picture has an activation bar not exceeding the alt block while the bar exceeds the alt block in the first picture. Which one do we follow?