Conversation
…comply with coding standard.
ChoonSiang
left a comment
There was a problem hiding this comment.
Generally ok, but try to be more careful with magic number and string. Avoid long and complicated function/statement.
src/main/java/huan/main/Huan.java
Outdated
| @@ -0,0 +1,142 @@ | |||
| package huan.main; | |||
|
|
|||
| import huan.task.*; | |||
There was a problem hiding this comment.
Avoid importing *, try to explicitly list out the import classes
src/main/java/huan/main/Huan.java
Outdated
| } | ||
| } | ||
| } | ||
| public static void readProcessCommand() { |
There was a problem hiding this comment.
Very long method, maybe try to abstract each command?
src/main/java/huan/main/Huan.java
Outdated
| String firstWord = words[0]; | ||
| String suffixWord; | ||
| if(words.length > 1) { | ||
| suffixWord = inputCommand.substring(words[0].length() + 1); |
There was a problem hiding this comment.
Multiple usage of Magic numbers, try to assign the number with a meaningful variable name for easy understand of what the number is for.
| String[] words = nameWithDate.split(" "); | ||
| /* | ||
| state: | ||
| 0 means currently concatenating name |
There was a problem hiding this comment.
Can consider using ENUM instead of 0,1 for the state
| import java.util.Objects; | ||
|
|
||
| public class DeadlineTask extends Task{ | ||
| private String ddlTime; |
There was a problem hiding this comment.
maybe can consider calling it deadlineTime, as ddlTime can be hard to understand what it means
| } | ||
| } | ||
| } | ||
| if(state != 2 || name.toString().isEmpty() || startTime.toString().isEmpty() || endTime.toString().isEmpty()) { |
There was a problem hiding this comment.
very long and complicated statement, can consider splitting it up
…ng deadline tasks before a specific time.
Add date time recognition in DeadlineTasks, and a command for filteri…
Add 'find' feature that allows filtering tasks by matching names
Add Javadoc Comments.
No description provided.