Skip to content

[Deen Liong] iP#83

Open
deenliong wants to merge 56 commits into
nus-cs2113-AY2223S1:masterfrom
deenliong:master
Open

[Deen Liong] iP#83
deenliong wants to merge 56 commits into
nus-cs2113-AY2223S1:masterfrom
deenliong:master

Conversation

@deenliong

Copy link
Copy Markdown

No description provided.

@sevenseasofbri sevenseasofbri left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Deen, good job on the iP so far! I have added some comments on the code quality, coding standard violations and naming conventions. Hope they will be helpful. 👍🏽

System.out.println("What can I do for you?");
}

public static void main(String[] args) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This function is very long (>30lines). Do consider breaking it down into multiple smaller functions.

Comment thread src/main/java/duke/TaskManager.java Outdated

public class TaskManager {

public static void printSuccessfulAdd(Task[] tasks, int taskCount) {

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 avoid the usage of magic literals and consider refactoring them to final variables instead.

Comment thread src/main/java/duke/TaskManager.java Outdated

public static void printTaskList(Task[] tasks, int taskCount) {
System.out.println("\t_____________________");
// if there are no task

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This comment may be redundant. Consider removing it

package duke.exception;

public abstract class DukeException extends Exception {
//no other code needed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You don't need to add comments where it is perhaps not necessary to do so.

Comment thread src/main/java/duke/task/Task.java Outdated
}

public String getStatusIcon() {
if (isDone) { // mark done task with X

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe remove the comment here since it is redundant and the code explains itself well already.

Comment thread src/main/java/duke/task/Task.java Outdated
public String toString() {

return getStatusIcon() + description;
// return getStatusIcon() ;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid leaving commented out code in your codebase, since it reduces readability

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.

2 participants