nus-cs2113-AY1920S2 / pe-dev-response

0 stars 0 forks source link

Should the condition be in the same line with alt? #736

Open nus-pe-bot opened 4 years ago

nus-pe-bot commented 4 years ago

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.


Should the condition be in the same line with alt? Is it more correct to push the condition in the next line just as the red arrow shows

WX20200415-131829@2x.png


[original: nus-cs2113-AY1920S2/pe-interim#744]

yantingsanity commented 4 years ago

Team's Response

The two frames that says quantity != null and ingredientQuantity == 0 || quantity != null are two other if-else conditions that happens in the main if block, so it should not be moved to the left.
I am also unsure if the condition should be moved below the alt. But according to the lecture notes, the condition is shown beside the alt word.

Duplicate status (if any):

--