-
Notifications
You must be signed in to change notification settings - Fork 102
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
[Chiam Jia-En] IP #106
base: master
Are you sure you want to change the base?
[Chiam Jia-En] IP #106
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.
Good Job! ;)
|
||
@Override | ||
public String toString() { | ||
return "[D]" + super.getDescription() + " (by: " + by + ")"; |
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 should make the use of constants in order to avoid magic strings here...
|
||
@Override | ||
public String toString() { | ||
return "[E]" + super.getDescription() + " (at: " + at + ")"; |
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.
same goes here...refer to line 11 Deadline.java comments
src/main/java/Parser.java
Outdated
String currentRead = saveFileScanner.nextLine(); | ||
String[] taskSave = currentRead.trim().split(" \\| "); | ||
switch (taskSave[0].trim()) { | ||
case "todo": |
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 change "todo", "deadline","event" to constants (enum?) in order to remove magic strings. In addition, maybe you should make the use of Single Level of Abstraction Principle (SLAP) concept and for each case statement devise a method to handle the abstractions.
src/main/java/Parser.java
Outdated
case "list": | ||
list.printList(); | ||
break; | ||
case "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.
same goes here... maybe you should improve your code abstraction by having a single method (in charge for the abstraction) for each case statement
} | ||
|
||
public String getStatusIcon() { | ||
return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols |
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.
refer to the magic string comment.
change parser and duke
(cherry picked from commit f69471b)
add find command to duke
resolve merge conflict
Add Greet, Echo, Exit.
Add task, list, mark done, todo, event and deadline.