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

[Huang Zhenxin] ip #249

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

[Huang Zhenxin] ip #249

wants to merge 69 commits into from

Conversation

Hzxin
Copy link

@Hzxin Hzxin commented Feb 1, 2021

No description provided.

public class AddCommand extends Command {

/**
* Create a AddCommand object for execution.

Choose a reason for hiding this comment

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

Perhaps it is 'Creates' instead of 'Create'?

Choose a reason for hiding this comment

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

... I noticed the same minor grammatical issue in other places too



private static Boolean handleDeadline(String task, String date) {

Choose a reason for hiding this comment

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

Should this new line be removed?

Comment on lines 13 to 14


Choose a reason for hiding this comment

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

Should these lines between class declaration and constructor be removed?

public class DeleteCommand extends Command {


public DeleteCommand(String task, String date) {

Choose a reason for hiding this comment

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

Perhaps Javadoc comments could be added for the constructor?

/**
* Sub-class of command that represents and execute the "bye" instruction of user.
*/
public class ExitCommand extends Command {

Choose a reason for hiding this comment

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

I like how you further extract Command into child classes :)


import duke.driver.DukeDriver;


Choose a reason for hiding this comment

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

Should there be a new line here?

TaskList.addTask(deadlines);
System.out.println(Ui.biggerBox(deadlines));
}

Choose a reason for hiding this comment

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

Some of the new line spacing is a bit inconsistent. Perhaps you can standardize whether you're putting a new line spacing after every curly brace

* @param date date of the user task to be done.
*/
public FindCommand(String task, String date) {
super("find", task, date, command -> {

Choose a reason for hiding this comment

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

I like how you split up the code into separate lines! Much more readable

/**
* sub-class of Task to represents a task with deadline.
*/
public class Deadlines extends Task {

Choose a reason for hiding this comment

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

Perhaps this can be named Deadline instead of Deadlines, since it is a single Task

}
}

public static void clearAllTask() {

Choose a reason for hiding this comment

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

Shouldn't this be clearAllTasks instead?

* @param t task to be wrapped.
* @return the String representation of the task name wrapped in a chatBox.
*/
public static String biggerBox(Task t) {

Choose a reason for hiding this comment

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

Perhaps can rename this to makeBiggerBox

* @param date the String representation of date.
* @return MMM d yyyy format of date and return error message if the given date is in wrong format.
*/
public static String converter(String date) {

Choose a reason for hiding this comment

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

Should name this as an action, like convert

@@ -0,0 +1,103 @@
package duke.ui;

Choose a reason for hiding this comment

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

I like how everything is packaged! Very neat and clear :)

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.

3 participants