-
Notifications
You must be signed in to change notification settings - Fork 118
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
Philip Chang // iP PR #124
base: master
Are you sure you want to change the base?
Conversation
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.
Just some formatting errors and some coding styles to follow for this course! Good work!
src/main/java/PlopBot.java
Outdated
String command = parts[0].toLowerCase(); | ||
String details = parts.length > 1 ? parts[1] : ""; | ||
|
||
switch (command) { |
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.
For your switch statements, you could follow the following style set by the couse in this link!
src/main/java/PlopBot.java
Outdated
} | ||
catch (Exception e) { | ||
} | ||
System.out.println(""); |
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 you couild indicate a meaningful message for exceptions thrown?
src/main/java/PlopBot.java
Outdated
catch (IllegalArgumentException ex) { | ||
switch (dateString.toLowerCase()) { | ||
case "today": | ||
return now; |
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.
Do include break statements, and indicate if its an explicit fallthrough
src/main/java/PlopBot.java
Outdated
String[] parts = dateTimeString.split(" ", 2); | ||
|
||
if (parts.length == 2) { | ||
LocalDate date = parseDateString(parts[0]); |
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 it would be good to refactor parts[0]
to indicate what it means
src/main/java/Task.java
Outdated
this.taskName = taskName; | ||
this.type = TaskType.TODO; | ||
|
||
//this.isDone = false; |
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.
Do remove unnecessary lines!
src/main/java/Task.java
Outdated
public String getTypeIcon() { | ||
switch (type) { | ||
case TODO: | ||
return "T"; |
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 you can avoid magic strings and store the strings!
ip // Final JAR Release
Notes: - Added abstraction & documentation // Parser.java - Added abstraction & documentation, fixed errors that would cause the program to exit // PlopBot.java - Added documentation // Storage.java - Added documentation, cleaned up code // Task.java - Added documentation // TaskList.java - Added documentation // Ui.java
plopBot iP // PR