-
Notifications
You must be signed in to change notification settings - Fork 437
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
base: master
Are you sure you want to change the base?
[Chew Song Yu] iP #113
Conversation
Merge branch 'A-MoreOOP'
There was a problem hiding this 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.
|
||
public class Parser { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
this.date = LocalDate.parse(dateAndTimeArr[0]); | ||
this.time = Integer.parseInt(dateAndTimeArr[1]); |
There was a problem hiding this comment.
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 ? "[✓]" : "[✗]"; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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'
src/main/java/com/duke/gui/Main.java
Outdated
package com.duke.gui; | ||
import java.io.IOException; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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!
Add assertions
Refactor code
No description provided.