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

[Chew Song Yu] iP #113

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

[Chew Song Yu] iP #113

wants to merge 51 commits into from

Conversation

sogggy
Copy link

@sogggy sogggy commented Aug 22, 2020

No description provided.

Copy link

@LeeJoonJie LeeJoonJie left a comment

Choose a reason for hiding this comment

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

Overall, I like that you followed most of the coding standards and quality guidelines! The code was generally clean and easy to read. Just some things to fix. It would be helpful if you add more javadoc comments to the methods and classes.

Comment on lines +4 to +5

public class Parser {

Choose a reason for hiding this comment

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

Should there be a javadoc description for the class? I noticed this in the other classes also.

this.filePath = filePath;
}

public void printFileContents() {

Choose a reason for hiding this comment

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

Should there be a javadoc description for this public method? I noticed this in the other methods also.

this.time = Integer.parseInt(dateAndTimeArr[1]);
}

public Deadlines(String task, String dateAndTime, boolean done) {

Choose a reason for hiding this comment

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

Perhaps the 'done' parameter should be renamed to 'isDone' to make it sound like a boolean. I saw this is some other methods as well.

Comment on lines +19 to +20
this.date = LocalDate.parse(dateAndTimeArr[0]);
this.time = Integer.parseInt(dateAndTimeArr[1]);

Choose a reason for hiding this comment

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

Is the 'this' keyword necessary here? The date and time variables are not shadowed by the constructor parameters so maybe it would be better to leave them out as per the java coding standard. I saw this is some other methods as well.


@Override
public String toString() {
String doneIndicator = this.done ? "[✓]" : "[✗]";

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 make "[✓]" and "[✗]" named constants to avoid using 'magic' values?

System.out.println("\t\t" + task.toString());
System.out.println("\tNow you have " + this.taskList.size() + " tasks in the list.");
Ui.sectionize();
} catch (IndexOutOfBoundsException e) {

Choose a reason for hiding this comment

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

Maybe 'e' should be renamed to something more descriptive, eg. 'error'

Comment on lines 1 to 2
package com.duke.gui;
import java.io.IOException;

Choose a reason for hiding this comment

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

Should there be a line between the package and import statements?

@@ -0,0 +1,133 @@
package com.duke.parser;

Choose a reason for hiding this comment

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

I like how comprehensive your testing here is!

public class ParserTest {

@Test
public void isDoneTest_inputLetters_returnFalse() {

Choose a reason for hiding this comment

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

I like the clear naming of the testing methods!

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

2 participants