Skip to content

[{Shi Zheng}] iP#258

Open
Shizheng001 wants to merge 28 commits into
nus-cs2103-AY2021S2:masterfrom
Shizheng001:master
Open

[{Shi Zheng}] iP#258
Shizheng001 wants to merge 28 commits into
nus-cs2103-AY2021S2:masterfrom
Shizheng001:master

Conversation

@Shizheng001
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@BigDoot BigDoot left a comment

Choose a reason for hiding this comment

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

There isn't very many issues with naming guidelines at the time of this review(as there aren't many methods yet), other than a few minor nitpicks! Fix them and you are good to go!

Comment thread src/main/java/Duke.java Outdated
System.out.println("Bye. Hope to see you again soon!");
}

public static void errorHandling(String input) throws DukeException {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Following the coding guidelines, method names should be verbs. Perhaps handleError() would be a better method name?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same sentiment as the above!

Comment thread src/main/java/Task.java Outdated
return this.description;
}

public Task changeStatus(Task t) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since this method is a setter, maybe setStatusTrue() would be better? It would explain to readers what status you are changing to as well!

Comment thread src/main/java/Deadline.java Outdated
super(description);
}

public Deadline(String description, boolean b) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

instead of using b, you could just use isDone.

Comment thread src/main/java/Duke.java Outdated
Comment on lines +6 to +10
/**
* main method to run the program
*
* @param args command line arguments taken in
*/
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor nitpick but perhaps consider starting Javadoc sentences with an uppercase letter and ending with a full stop to keep within the coding standard.

Comment thread src/main/java/Duke.java Outdated
Comment on lines +60 to +61
int taskToDelete = Integer.parseInt(input.substring(7));
Task toRemove = items.get(taskToDelete - 1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps int taskToDelete could be indexOfTaskToDelete even though it may be quite long.
It may help to distinguish it from Task toRemove.

Copy link
Copy Markdown

@hengyiqun hengyiqun left a comment

Choose a reason for hiding this comment

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

Clear code overall. Just a few nits to work out.

Comment thread src/main/java/Event.java Outdated
}

public Event(String description, boolean b) {
super(description,b);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps you could use isDone instead of b, so that it is more descriptive?

Comment thread src/main/java/Deadline.java Outdated
}

public Deadline(String description, boolean b) {
super(description,b);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For greater readability, perhaps you could have a whitespace after the comma?

Comment thread src/main/java/Event.java Outdated
@@ -0,0 +1,14 @@
public class Event extends Task {
public Event(String description) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should there be an empty line before this constructor?
I notice that there are times you leave an empty line before constructors, and there are times you leave out the empty line.

Comment thread src/main/java/Duke.java Outdated
System.out.println("Bye. Hope to see you again soon!");
}

public static void errorHandling(String input) throws DukeException {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same sentiment as the above!

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.

5 participants