[Zeng Xunyi] iP#78
Conversation
| if(input.equals("list")){ | ||
| System.out.println("Here are the tasks in your list:"); | ||
| for(int i =0 ; i<3; i++){ | ||
| System.out.println((i+1) + ". " + taskList[i].toString()); |
| input[0] = sc.nextLine(); | ||
| while(!input[idx].equals("bye")){ | ||
| if(input[idx].equals("list")){ | ||
| idx--; |
There was a problem hiding this comment.
The logic isn't clear. idx -- in this line and idx ++ in line 25
| } | ||
|
|
||
| public void markAsDone(){ | ||
| this.isDone=true; |
froststein
left a comment
There was a problem hiding this comment.
Followed some of the coding standard.
Just a couple of spaces to add and remove and it follows the coding standard.
| while(!input[idx].equals("bye")){ | ||
| if(input[idx].equals("list")){ | ||
| idx--; | ||
| for(int i =0; i<=idx ;i++){ |
There was a problem hiding this comment.
For-loop variable declaration could have been more spaced out?
| System.out.println((i+1) + ". " + taskList[i].toString()); | ||
| } | ||
| } | ||
| else if(input.contains("unmark")){ |
There was a problem hiding this comment.
Consider else / else if on the same line after the }.
Consider the spaces between ) and {.
| taskList[2] = new Task("buy bread"); | ||
|
|
||
| taskList[0].markAsDone(); | ||
|
|
There was a problem hiding this comment.
Consider reducing the amount of spaces in between lines of code
| int idx = Integer.parseInt(input.replace("unmark ", "")); | ||
| taskList[idx-1].markAsUndone(); | ||
| System.out.println(taskList[idx-1].toString()); | ||
|
|
There was a problem hiding this comment.
Consider removing the extra line after every if else block
limjierui
left a comment
There was a problem hiding this comment.
There seems to be 2 main functions, Greet and TaskManager. Maybe can combine both into one to make one of it the main function.
Would be better if you are able to continuously taking in inputs and adding them to tasks instead of having only 3 inputs.
For taking in of commands, maybe it will be better not to replace the words in the commands. Instead, can just split the string and obtain different parts if the commands.
Displayed some OOP concepts such as Classes.
# Conflicts: # src/main/java/controller/TaskManager.java
add java doc
add find function
No description provided.