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

[Jin Ming] iP #269

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

Conversation

jmleong666
Copy link

No description provided.

Copy link

@boundtotheearth boundtotheearth left a comment

Choose a reason for hiding this comment

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

Good Work!

* file and writing the updated tasks into the new storage file.
*
* @param tasks List of updated tasks.
*/

Choose a reason for hiding this comment

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

Should this method be called updateFile instead?
"update" alone may be too vague and can be confused with updating the class' state or updating individual task data

* @param userCommand User's command keyword (first word in the user's input).
* @param key Supported command key.
* @return Whether user's command keyword is supported.
*/

Choose a reason for hiding this comment

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

Should this method just be called "equals"?
This method already belongs to the CommandKey enum, so it would be called as CommandKey.equalsCommandKey, which might be redundant.
Just having "equals" would also match the equals method for other data types like Strings

Comment on lines 15 to 18
static String ADD_TASK_LINE = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
static String DONE_TASK_LINE = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
static String LIST_TASK_LINE = "________________________________________________________";
static String BYE_LINE = "========================================================";

Choose a reason for hiding this comment

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

Would it be better to name these as "LINE_XXX_XXX" instead?
Should these variables be final?
They appear to be constants and prefixing them with the same word will make them appear together when sorted alphabetically (see coding standard document)

Copy link

@wenhaogoh wenhaogoh left a comment

Choose a reason for hiding this comment

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

The code is clean and easy to read. I did not many coding standard violations. Good work!

*/
public abstract class Task {
protected String task;
protected boolean done;

Choose a reason for hiding this comment

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

Should this be renamed as isDone?

Copy link

@joshtyf joshtyf left a comment

Choose a reason for hiding this comment

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

Just a few minor coding standard violations. Other than that it looks good.

}

/**
* Tells Duke to keep on keeping on.
Copy link

Choose a reason for hiding this comment

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

Should this be reworded?

Comment on lines 77 to 78
+ this.date.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM))
+ " " + this.time.format(DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT))
Copy link

Choose a reason for hiding this comment

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

Should you remove the this keyword? In the Java Coding Standard documentation called "Avoid unnecessary use of this with fields.", it mentions how the the this keyword should only be used when a field is shadowed by a method or constructor parameter.

}

/**
* Tells Duke to keep on keeping on.

Choose a reason for hiding this comment

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

Comment could be clearer, not sure what it is trying to help with.

* @param task
* @return true.
*/
public boolean add(Task task) {
Copy link

@rgabelarde rgabelarde Sep 5, 2020

Choose a reason for hiding this comment

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

Maybe this can be renamed as users might not be able to tell that it is a boolean on first look, maybe taskIsAdded?

@rgabelarde
Copy link

Great job with the current progress, not much comments to give since your code is neat and have been commented out well for users. Doing great :)

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.

None yet

5 participants