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

[Koh Han Ming] iP #401

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

Conversation

KohHanMing
Copy link

No description provided.

Copy link

@samlsm samlsm left a comment

Choose a reason for hiding this comment

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

Overall, it was a pleasant experience to read through your code. The method and variable names are clear and intuitive.

} else if (input.equals("find")) {
if (taskList.isEmpty()) {
throw new EmptyListException("There are no tasks on your list");
}
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 better to check if taskList.isEmpty() at the start so as to avoid deep nesting? Or maybe it would be good to create a method that checks if the taskList is empty so as to avoid code duplication.

Copy link

Choose a reason for hiding this comment

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

Also, perhaps it would be great to split up this long method to shorter ones?

Copy link

Choose a reason for hiding this comment

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

I'd concur with the views above - hope the changes aren't much trouble :))

Copy link
Author

Choose a reason for hiding this comment

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

Oh that makes a lot of sense. It prevents duplicate code too. Thanks a lot guys! :)

@@ -0,0 +1,81 @@
import java.io.*;
Copy link

Choose a reason for hiding this comment

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

Maybe it might be better to explicitly list the files you are importing instead of importing all the files?

Copy link

Choose a reason for hiding this comment

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

Explicitly listed, the classes would be BufferedReader, BufferedWriter, File, FileReader and FileWriter.

Copy link
Author

Choose a reason for hiding this comment

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

Noted, thanks!!

* Creates a Todo object
* @param description Description of task.
* @param taskType Type of task.
*/
Copy link

Choose a reason for hiding this comment

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

perhaps it would be good to have an empty line between the descriptions and parameters.

Copy link

@mkeoliya mkeoliya left a comment

Choose a reason for hiding this comment

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

LGTM. The code style and quality were almost impeccable - I loved how the unit tests were written! Nit: Maybe you could start commit messages with an imperative verb to comply with the SE-EDU guidelines.

Comment on lines 4 to 11
<<<<<<< HEAD
/**
* Supports the creation of Deadline objects.
*/
public class Deadline extends Task{
=======
public class Deadline extends Task {
>>>>>>> branch-A-CodingStandard
Copy link

Choose a reason for hiding this comment

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

Perhaps you missed out a merge conflict here?

Copy link
Author

Choose a reason for hiding this comment

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

I did, thanks for pointing it out!

} else if (input.equals("find")) {
if (taskList.isEmpty()) {
throw new EmptyListException("There are no tasks on your list");
}
Copy link

Choose a reason for hiding this comment

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

I'd concur with the views above - hope the changes aren't much trouble :))

@@ -0,0 +1,81 @@
import java.io.*;
Copy link

Choose a reason for hiding this comment

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

Explicitly listed, the classes would be BufferedReader, BufferedWriter, File, FileReader and FileWriter.

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

3 participants