IshaaanVyas / pe

0 stars 0 forks source link

Return not inside opt block #16

Open IshaaanVyas opened 2 years ago

IshaaanVyas commented 2 years ago

image.png

If the method is only being called inside the opt block then the return should be inside the opt block as well

nus-se-bot commented 2 years ago

Team's Response

No details provided by team.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

[DG] Opt block UML error

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.


Page 8 DG, the return arrow and the activation bar of EmployeeUI should be inside the opt block. Same issues in the other part of the same diagram (opt and alt blocks)

Screen Shot 2021-11-12 at 17.31.31.png

Screen Shot 2021-11-12 at 17.30.42.png


[original: nus-cs2113-AY2122S1/pe-interim#2232] [original labels: severity.Low type.DocumentationBug]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

As seen on the module website, it is okay for the return arrow and activation bar to be outside of the opt block. The opt block is simply there to indicate an optional path, hence, the activation bar of the EmployeeUI may extend past the opt block. This applies to alt blocks as well. I believe the important thing to note is that the return arrow must be after the opt/alt blocks.

image.png

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: image.png

The module website does not state anywhere that return arrows can be outside opt blocks. The screenshots provided by the dev team do not include any return arrows as in that diagram they have been omitted for simplicity, this does not mean that if return arrows had not been omitted then they can be outside opt blocks.

This does not make sense as the method is being called only inside the opt block. For example,

image.png

here this would translate to something like this in java (cant write <= in CATcher code block so I just replaced it with ==)

if (command == 0) {
 EmployeeUI.printInvalidPhoneNumberMessage();
}

but the sequence diagram shows that even when the method is not called, somehow it still returns even outside the if statement?


:question: Issue severity

Team chose [severity.Low] Originally [severity.Medium]

Reason for disagreement: [replace this with your explanation]