Level 3 completed - #77
Conversation
trishaangelica
left a comment
There was a problem hiding this comment.
Overall, we found your code easy to read for the most part except for a few places. We hope our comments can help you improve the code further.
All the best for your iP :-)
[Also took part in this review: @jiajuinphoon]
| } | ||
| break; | ||
| case "done": | ||
| command = input.next(); |
There was a problem hiding this comment.
Great job so far! Perhaps, this variable "command" could be named better since there is already another variable "command" used? 😄
|
|
||
| System.out.println("Hello! I'm Duke\nWhat can I do for you?"); | ||
|
|
||
| loop: do { |
There was a problem hiding this comment.
loop label is commonly used in C.. maybe you could exit at the case: "bye" instead of having a switch with a do-while loop? 💭
| switch(command) { | ||
| case "bye": | ||
| System.out.println("Bye. Hope to see you again soon!"); | ||
| break loop; |
There was a problem hiding this comment.
good job on following the coding standard 👍
| System.out.println("Nice! I've marked this task as done:"); | ||
| System.out.println("[Done] " + tasks[i-1]); | ||
| break; | ||
| default: |
There was a problem hiding this comment.
Another possible suggestion is to add comment lines so that it's easier to follow through a block of code 😃
All the functions are clumped together for now, next step is level 4 and creating individual