[Chua Zhong Heng] iP#63
Conversation
| public static void printLine() { | ||
| System.out.println(" ____________________________________________________________"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Can consider adding javadoc comments for each method for greater clarity.
| add(itemList, markList, item); | ||
| } | ||
| dialogue(itemList, markList); | ||
| } |
There was a problem hiding this comment.
Good use of naming standards, e.g camelCase
| } | ||
| printLine(); | ||
| } | ||
|
|
| int listIndex = Integer.parseInt(splitItem[1]); | ||
| unmark(itemList, markList, listIndex); | ||
| } else { | ||
| add(itemList, markList, item); |
There was a problem hiding this comment.
indentations just require one more space
ShaniceTang
left a comment
There was a problem hiding this comment.
Overall, your coding quality is very well done and your code is readable! Great job! 💯
| printLine(); | ||
| System.out.println(item); | ||
| printLine(); | ||
| echo(); |
There was a problem hiding this comment.
Nice!
I like that you use recursion :)
| int listIndex = Integer.parseInt(splitItem[1]); | ||
| mark(itemList, markList, listIndex); | ||
| } else if (item.length() > 6 && item.substring(0, 6).equals("unmark")) { | ||
| String[] splitItem = item.split(" "); |
There was a problem hiding this comment.
Could this array be named "items" instead?
| printLine(); | ||
| } | ||
|
|
||
| public static void main(String[] args) { |
There was a problem hiding this comment.
I like that your main method is short and neat :D
| public static void dialogue(ArrayList<String> itemList, ArrayList<String> markList) { | ||
| Scanner input = new Scanner(System.in); | ||
| String item = input.nextLine(); | ||
| if (item.equals("bye")) { |
There was a problem hiding this comment.
I like that you use else-if instead of nesting 👍
This reverts commit 3dbdfbc.
Add Error Handling function
woowenjun99
left a comment
There was a problem hiding this comment.
Good job on your first milestone! Not to bad, just that perhaps you might want to consider replacing all the magic number and magic string with variables and not sure if I am correct, there is a recursive call.
| @@ -0,0 +1,15 @@ | |||
| public class Event extends Task{ | |||
There was a problem hiding this comment.
Perhaps you want to add an additional space in front of the curly paranthesis?
| printLine(); | ||
| System.out.println(" Here are the tasks in your list:"); | ||
| for (int i = 0; i < taskList.size(); i++) { | ||
| System.out.printf(" %d.%s\n", i+1, taskList.get(i)); |
|
|
||
| public static void printGreetingMessage() { | ||
| printLine(); | ||
| System.out.println(" Hello! I'm KenergeticBot\n" + " What can I do for you?"); |
There was a problem hiding this comment.
Perhaps you would like to replace all the magic strings and numbers in your code with variables for greater readability?
| System.out.println(KenergeticBotException.INVALID_COMMAND); // unable to print sad face ˙◠˙ | ||
| } | ||
| } | ||
| botDialogue(taskList); |
|
|
||
|
|
There was a problem hiding this comment.
Perhaps you would like to remove these extra spaces?
| protected String taskType; | ||
| protected int taskIndex; |
There was a problem hiding this comment.
Perhaps you would like to remove this unused variable?
Add Delete function
Add Save function
Add Find function
Add Java Documentation
No description provided.