-
Notifications
You must be signed in to change notification settings - Fork 73
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
Level 3 completed #77
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.
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]
src/main/java/Duke.java
Outdated
} | ||
break; | ||
case "done": | ||
command = input.next(); |
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.
Great job so far! Perhaps, this variable "command" could be named better since there is already another variable "command" used? 😄
src/main/java/Duke.java
Outdated
|
||
System.out.println("Hello! I'm Duke\nWhat can I do for you?"); | ||
|
||
loop: do { |
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.
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? 💭
src/main/java/Duke.java
Outdated
switch(command) { | ||
case "bye": | ||
System.out.println("Bye. Hope to see you again soon!"); | ||
break loop; |
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 on following the coding standard 👍
src/main/java/Duke.java
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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