-
Notifications
You must be signed in to change notification settings - Fork 315
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
[Yoon Jia Jun Ken] Duke Increments #364
base: master
Are you sure you want to change the base?
Conversation
Add toolVersion block in to Gradle code sample to prevent errors.
Change file mode on `gradle` to be executable (nus-cs2103-AY1920S1#9)
Gradle defaults to an empty stdin which results in runtime exceptions when attempting to read from `System.in`. Let's add some sensible defaults for students who may still need to work with the standard input stream.
Add configuration for console applications
# Conflicts: # src/main/java/Task.java
# Conflicts: # src/main/java/Deadline.java # src/main/java/Event.java
Hello Xelyion! I understand that the pull request should be done with your project's master branch, but as the bulk of your business logic is in your previous pull request (branch-Level-9), I have made my comments there instead. |
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.
Hi, Jia Jun! I think your JavaDoc is very detailed and most of them are following the correct formats. The logic of indvidual parts is mostly clear as well. However, you may want to refactor some parts so that the whole structure could be more reasonable.
src/main/java/AddCommand.java
Outdated
* Adds Deadlines: "deadline". | ||
* Adds Events: "event". | ||
* Adds ToDos: "todo". | ||
* |
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.
Very detailed Javadoc but may consider writing more clear explanations.
src/main/java/Command.java
Outdated
|
||
public String execute(Ui ui, TaskList taskList, Storage storage) throws DukeException { | ||
return ""; | ||
} |
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.
May consider making this method as abstract so that you do not need to return a default string.
src/main/java/Command.java
Outdated
* An abstract class command, created from the Parser. | ||
* Contains Strings to store the command and type of command. | ||
*/ | ||
|
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.
I think there is no line break between them =)
src/main/java/Command.java
Outdated
} | ||
|
||
|
||
} |
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.
Personally, I think the child classes of Command can self-explain their "type". Maybe you could consider making full use of this.
src/main/java/Deadline.java
Outdated
} else { | ||
throw new DukeException(" Date is not in the format: (DD/MM/YYYY HHMM)"); | ||
} | ||
} |
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.
For parsing date string to a date object. You may find LocalDateTime.parse() method useful. You may want to refer to this link: https://www.baeldung.com/java-string-to-date. Besides, would it be better if this method belongs to Parse class?
src/main/java/Parser.java
Outdated
return command; | ||
} | ||
|
||
} |
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.
It is very nice that you added "save" command! However, you may consider using switch and case to make the code structure clearer. Besides, you could consider using the String.split().
No description provided.