[Minyue] iP - #193
Conversation
| tasks[id].setIsDone(); | ||
| tasks[id].setDone(); |
Move task handling logic into a new class
yuejunfeng0909
left a comment
There was a problem hiding this comment.
You may want to consider add the methods to the individual classes instead of using a separate function to handle all the methods
| public static void main(String[] args) { | ||
|
|
||
| public static void sayHello() { | ||
| String logo = " ____ _ \n" |
There was a problem hiding this comment.
since logo should be a constant, can change the variable name to uppercase and set it as a constant
| protected Task[] tasks; | ||
|
|
||
| public TaskHandler() { | ||
| this.tasks = new Task[100]; |
There was a problem hiding this comment.
you may want to use a constant MAX_TASKS instead of putting a random number here
| } | ||
|
|
||
| public String handleTasks(String line) { | ||
| String lc = line.toLowerCase(); |
There was a problem hiding this comment.
try not to use acronyms in the codes
Handle user input errors using exceptions Tidy Formatter code
Place into a package duke
Update implementation of TaskHandler to use ArrayList instead of array
Add ability to add, edit and clear tasks stored in the external file
Add ability to add, edit and clear tasks stored in the external file
shivin9
left a comment
There was a problem hiding this comment.
Nice code overal. Formatting can be imporved though
|
|
||
| protected String at; | ||
|
|
||
| public Event(String description, String at) { |
There was a problem hiding this comment.
Can have a more descriptive name than 'at'
| return OUTPUT_START; | ||
| } | ||
|
|
||
| public static void printInputStart() { |
There was a problem hiding this comment.
You can have a small description before functions...
| } | ||
| } | ||
|
|
||
| private void openFile() { |
There was a problem hiding this comment.
Comments before functions would help...
| Todo newTodo = new Todo(description); | ||
| tasks.add(newTodo); | ||
| appendLinetoFileData(newTodo.toString()); | ||
| return returnAddTaskSuccess() + newTodo.toString(); |
There was a problem hiding this comment.
You can break this line into two according to me
| return addDeadline(line); | ||
| } | ||
| } else if (inputIsEvent(lc)) { | ||
| if (!eventContainsAt(lc)) { |
There was a problem hiding this comment.
Try to avoid double nesting if possible...
|
|
||
| protected String description; | ||
| protected boolean isDone; | ||
|
|
…ed task to be listed incorrectly
Add find feature and fix bug when there is no value for certain commands
This reverts commit d16fdfe.
…the farewell message
Merge branch-A-Javadoc
Fix issues that arose from merging from master
Update README.md with User Guide
No description provided.