Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Hao Yun]iP #53
base: master
Are you sure you want to change the base?
[Hao Yun]iP #53
Changes from 4 commits
65f72a8
0112efe
cfd6da7
6e6ace1
a3ca5a4
7b60e81
c4678f7
30efbae
e253dff
486b841
a7d63e5
e282ba7
9c6c52e
f042271
267000d
f91a9c3
6f0b7eb
40ffee0
73097f2
1cc9d70
a362fd3
f684ba1
0716c7e
abbb7d3
4d1a286
37353f0
a827ebe
6ff5025
15f1dd6
7bc7f7b
90ad6eb
7455fe1
0e60f25
12f441a
db22159
971f8d8
e6ea98c
c8dca17
e5fb6da
5df9c94
c5c1b7a
0e1cf64
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to consider changing the name of this method to make it more descriptive, as it could be confused for System.exit()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, you could consider renaming this method to be more descriptive, as it could be confused for the Java Thread run() method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to consider creating a constant for the number 5 here. Creating a constant can help to give more meaning to the number written here.
Reference Link: Magic Number
Alternatively, you may want to consider changing this line to be more descriptive to avoid confusion, such as
int taskNum = Integer.parseInt(command.substring(5)), or adding a comment to make it clearer what this does, like //command syntax: done 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you may want to consider putting the logo and the print statements into another method to better implement the SLAP principle such as the greet() method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to consider seperating this statement into a few more lines to make the code more readable. For example, you may want to first create variables for each item in the print function:
String isDone = tasks[i].isDone? '✓':'✗';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to consider changing this whitespace to \t, to standardise any future tabbed spaces and to reduce confusion for future implementation by other viewers