Skip to content

[Qu Mingsi] iP#468

Open
e0316059 wants to merge 48 commits into
nus-cs2103-AY2021S1:masterfrom
e0316059:master
Open

[Qu Mingsi] iP#468
e0316059 wants to merge 48 commits into
nus-cs2103-AY2021S1:masterfrom
e0316059:master

Conversation

@e0316059

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/Duke.java
* this method handles two types of error: invalid input (does not contain todo/deadline/event)
* and empty task (if the input starts with todo/deadline/event and the content is not empty,
* it is assumed that the input has correct structure)
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As per iP task on code quality, should the JavaDoc contain descriptions on the input parameter?

Comment thread src/main/java/Duke.java Outdated
}
}

private static void readFile() throws FileNotFoundException {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As per iP task on code quality, should this function be accompanied with a JavaDoc?

@AudreyFelicio AudreyFelicio left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall, the code looks good and well structured 😃.
Only some small improvements needed.
Great job!

Comment thread src/main/java/Deadline.java Outdated
Comment on lines +18 to +19
return "[D]" + super.toString() + "(by: " +
time.format(DateTimeFormatter.ofPattern("MMM d yyyy HH:mm")) + ")";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standard, should the + after "(by: " be on the second line instead of the first line?

Comment thread src/main/java/Event.java Outdated
Comment on lines +18 to +19
return "[E]" + super.toString() + "(at: " +
time.format(DateTimeFormatter.ofPattern("MMM d yyyy HH:mm")) + ")";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standard, should the + after "(at: " be on the second line instead of the first line?

Comment thread src/main/java/Parser.java Outdated
}

/**
* this method handles two types of error: invalid input (does not contain todo/deadline/event)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standards, should the javadoc header comment start in the form of Handles ...?

Comment thread src/main/java/Storage.java Outdated
try {
writeToFile(tasks);
} catch (IOException e) {
ui.showIOException(e);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standards, should the method name showIOException be showIoException?

Comment thread src/main/java/Ui.java Outdated
System.out.println("File not found");
}

public static void showIOException(IOException e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standards, should the method name showIOException be showIoException?

Comment on lines +1 to +3
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standards, should import static org.junit.jupiter.api.Assertions.assertEquals; be put above import org.junit.jupiter.api.Test;? The same comment for all other classes that have those two imports.

Comment on lines +12 to +14
public LocalDateTime getTime() {
return this.time;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the module's coding standards, should a javadoc comment exist above the method? The same comment for all other public methods.

public void testSetDone(){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm");
Event event = new Event("return book", LocalDateTime.parse("2000-01-01 2359", formatter));
assertEquals(false, event.getStatus());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can use assert(!event.getStatus()); here as well, just to make the code slightly cleaner, similar comment for line 20. The rest looks good, great job!

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.

4 participants