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

[Deen Liong] iP #83

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

Conversation

deenliong
Copy link

No description provided.

Copy link

@sevenseasofbri sevenseasofbri left a comment

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

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.


public class TaskManager {

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

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.


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

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

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.

}

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

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.

public String toString() {

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

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