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

[Yoon Jia Jun Ken] Duke Increments #364

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

Conversation

Xelyion
Copy link

@Xelyion Xelyion commented Sep 4, 2019

No description provided.

j-lum and others added 23 commits August 6, 2019 15:25
Add toolVersion block in to Gradle code sample to prevent errors.
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
@KendrickAng
Copy link

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.

Copy link

@ZhangHuafan ZhangHuafan left a 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.

* Adds Deadlines: "deadline".
* Adds Events: "event".
* Adds ToDos: "todo".
*

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.


public String execute(Ui ui, TaskList taskList, Storage storage) throws DukeException {
return "";
}

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.

* An abstract class command, created from the Parser.
* Contains Strings to store the command and type of command.
*/

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 =)

}


}

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.

} else {
throw new DukeException(" Date is not in the format: (DD/MM/YYYY HHMM)");
}
}

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?

return command;
}

}

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().

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

Successfully merging this pull request may close these issues.

5 participants