nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Optional Box for Sequence Diagrams #403

Closed joyngjr closed 1 year ago

joyngjr commented 1 year ago

Hi, I was looking at this sequence diagram from the textbook, and I don't quite understand why we have the opt box extended till past the end of the activation bar of ParserFactory.

image

Does this mean that the function will never return if the value is invalid and the opt path is not taken (since the return portion/end of the activation bar is within the opt box)?

damithc commented 1 year ago

@joyngjr Good observation. It would be more accurate to extend the activation bar beyond the edge of the opt box. That said, this minor discrepancy does not hinder the reader from reading the interaction correctly -- this is probably why no one else raised this issue till now.

Does this mean that the function will never return if the value is invalid and the opt path is not taken (since the return portion/end of the activation bar is within the opt box)?

We can rule out that interpretation as 'unrealistic'.