Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nus-pe-bot opened this issue Apr 15, 2020 · 1 comment
Open

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

nus-pe-bot opened this issue Apr 15, 2020 · 1 comment

Comments

@nus-pe-bot
Copy link

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
Copy link

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):

--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants