[CHEN ZIHAN] ip#198
Conversation
stevenantya
left a comment
There was a problem hiding this comment.
Overall good job on the pull request! Only few minor consistency and coding standards issues.
| } | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
remove the unnecessary blank spaces, follow one uniform spacing
|
|
||
|
|
||
|
|
||
| public static void add() { |
There was a problem hiding this comment.
Coding Standard violation: Ambiguity of function.
Can change the name of the function to explain more. e.g. addTodo()
|
|
||
| public static void add() { | ||
| boolean isByeEntered = true; | ||
| String outputs; |
There was a problem hiding this comment.
Coding Standard Violation: Plural form is reserved for collections of objects.
| String outputs; | |
| String output |
| public static void add() { | ||
| boolean isByeEntered = true; | ||
| String outputs; | ||
| String[] storeList; |
There was a problem hiding this comment.
Coding Standard Violation: Array should be plural
| String[] storeList; | |
| String[] storeLists; |
| return; | ||
| }else{ | ||
| System.out.println(outputs); | ||
| } else if(outputs.equals("list")){ |
There was a problem hiding this comment.
Coding Standard Violation: Give space before and after statement
| } else if(outputs.equals("list")){ | |
| } else if(outputs.equals("list")) { |
kairuler
left a comment
There was a problem hiding this comment.
Overall, I like how your code is quite clean and you adhered to coding standards most of the time! I noticed some variable names and spacing that you may have unintentionally overlooked but they are just minor errors. Good job!
|
|
||
| boolean isByeEntered = true; | ||
| String outputs; | ||
| public static final int MAX_INT = 100; |
There was a problem hiding this comment.
Nice! I like your usage of constants (instead of magic numbers) and I like how they are typed (all uppercase, underscore to separate words).
|
|
||
|
|
||
| public static void add() { | ||
| boolean isByeEntered = true; |
There was a problem hiding this comment.
Could isByeEntered be named to sound more like a boolean variable? It is a bit confusing what isByeEntered does just based off its name 😁 .
| if(list!=null) { | ||
| System.out.println(a + ". " + list); | ||
| a++; | ||
| }else{ |
There was a problem hiding this comment.
Spacing is sometimes inconsistent (maybe by accident?). Here, }else{ has no spaces between the braces but elsewhere, there are spaces. I noticed this a few times in the above code too. Be sure to double check!
| public static void add() { | ||
| boolean isByeEntered = true; | ||
| String outputs; | ||
| String[] storeList; |
There was a problem hiding this comment.
I like how your array specifier is attached to the type and not the variable 👍 nice
| String[] storeList; | ||
| storeList = new String[MAX_INT]; | ||
| int i = 0; | ||
| int a = 1; |
There was a problem hiding this comment.
I wasn't sure on what a did until I read the code fully... I think changing the variable name a could make it more understandable for readers!
| case "Bye": | ||
| System.out.println("Bye. Hope to see you again soon!"); | ||
| isByeEnter = true; | ||
| break; |
There was a problem hiding this comment.
Please separate into different methods to handle different commands, such as displayAllTasks(), UnmarkTask() etc.
this up to level 2