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

[Cheng Tze Ning] iP #67

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Conversation

tzzzening
Copy link

No description provided.

Copy link

@ananda-lye ananda-lye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not much violations, coding quality not bad :)

Copy link

@yolanmz yolanmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, your code is easy to read except some conditional statements can be possibly simplified. All your best for your iP xD

while (!userInput.equals("bye")) {
if (userInput.equals("list")) {
printTasks();
} else if (userInput.length() > 4 && userInput.substring(0, 5).equals("done ")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider simplifying the conditional statement using startsWith. It is applicable to the rest of the conditions below.
Ex. else if(userInput.startsWith("done")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestion. I find it very efficient 👍 Will add it to my code later on.

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

Successfully merging this pull request may close these issues.

3 participants