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

[Ek Chin Hui] iP #452

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

Conversation

EkChinHui
Copy link

No description provided.

Copy link

@leeweiminsg leeweiminsg left a comment

Choose a reason for hiding this comment

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

Nice code, LGTM!

* Getter for isDone.
* @return boolean of the status of the task.
*/
public boolean getIsDone() {

Choose a reason for hiding this comment

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

Not sure whether you really need a getter when you can make the isDone boolean public

Copy link

@FH-30 FH-30 left a comment

Choose a reason for hiding this comment

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

Overall good quality code, just a few nits to fix.


/**
* Constructor for Deadline, initialises description
* in the base class and also the dueDate.
Copy link

Choose a reason for hiding this comment

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

Perhaps an empty line between description and parameter section of javadoc?


/**
* Constructor for Duke class, initialises objects
* for Storage, TaskList and Ui.
Copy link

Choose a reason for hiding this comment

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

Perhaps an empty line between description and parameter section of javadoc? I noticed the same issue in several other places too.

/**
* Base class for custom exceptions specific to Duke.
*/
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.

Should there be spacing after "Exception" and before the curly brace?

Comment on lines 27 to 31
String month = dueDate.getMonth().getDisplayName(TextStyle.SHORT, Locale.forLanguageTag("en"));
int day = dueDate.getDayOfMonth();
int year = dueDate.getYear();
String timeDisplay = String.format("%d %s %d", day, month, year);
return "[D]" + super.toString() + String.format(" (by: %s)", timeDisplay);
Copy link

Choose a reason for hiding this comment

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

Perhaps it might be good to separate logical units in a block of code with blank lines?

Comment on lines 27 to 31
String month = time.getMonth().getDisplayName(TextStyle.SHORT, Locale.forLanguageTag("en"));
int day = time.getDayOfMonth();
int year = time.getYear();
String timeDisplay = String.format("%d %s %d", day, month, year);
return "[E]" + super.toString() + String.format(" (at: %s)", timeDisplay);
Copy link

Choose a reason for hiding this comment

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

I think it might be good to separate logical units in a block of code with blank lines. I noticed the same issue in several other places too.

Comment on lines 45 to 46
ui.printMessage("Added: " + task
+ String.format("\nNow you have %d tasks in the list", taskList.getTaskList().size()));
Copy link

Choose a reason for hiding this comment

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

I like how you break before an operator and after a comma, I have also noticed this in other sections of your code! 👍

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