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

[Jerryl Chong] iP #127

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

Conversation

jerrylchong
Copy link

No description provided.

Copy link

@lerxcl lerxcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Overall, good job on the OOP-aspects, as I can see the different kinds of types used. (Enum, abstract classes). It is meticulous of you to add specific Duke exception on top of it, and separating many components into classes. Other than a few missing JavaDocs, looks good to me. 👍

@@ -0,0 +1,222 @@
package duke;
import static java.lang.Integer.parseInt;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be nicer if you leave a line after package for your static import.

* Finds tasks matching the given keyword.
*
* @param keyword
* @return
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to fill in "@return ..."?

import duke.Ui;
import duke.exception.DukeException;

public class FindCommand extends Command {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public class and its methods are missing the JavaDoc.

@@ -0,0 +1,11 @@
package duke.exception;

public class DukeException extends Exception {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom DukeException should have JavaDoc too, to describe briefly what it does?

* @param s The description of the Deadline task.
* @param dateTime The due date of the Deadline task.
*/
public Deadline(String s, LocalDateTime dateTime) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The param "s" could perhaps have a more meaningful name, like "description"?

* @param s The description of the Event task.
* @param dateTime The date of the Event task.
*/
public Event(String s, LocalDateTime dateTime) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as mentioned in Deadline class.


@Test
public void parse_doneWithNonIntegerValue_exceptionThrown() {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still a work-in-progress right?


import duke.task.Task;

public class ToDoStub extends Task {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need a JavaDoc here as it is a public class.

Copy link

@raysonkoh raysonkoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

Apart from minor nits in the naming of some variables and methods, your code is clean and readable. I liked that you have very granular Exception checking. You might want to consider writing tests for your Storage class since it is a core class to your application.

*
* @param s The given String
*/
public void say(String s) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would print be a better way to convey the behavior of the say method?

import duke.exception.DukeException;
import duke.task.Task;


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to remove the additional line-breaks in this section?


@SuppressWarnings("ALL")
public class TaskList {
private ArrayList<Task> list;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would naming the list variable as tasks better convey the contents of the ArrayList?

* @return The description of the marked task.
* @throws DukeException If there is no task with the given index.
*/
public String done(int index) throws DukeException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done might be a little ambiguous. Would a better name be markAsDone?

*
* @return The task in a Storage readable format.
*/
public abstract String toCommand();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would toReadableTaskFromat be a more accurate description of this method?

import duke.exception.DukeException;

public class DueInCommand extends Command {
private long time;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what this variable is for. Similarly for hour. Would it be better to rename this variable to be more descriptive?

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

Successfully merging this pull request may close these issues.

None yet

3 participants