[waiter-palypoo] ip#193
Open
waiter-palypoo wants to merge 31 commits into
Open
Conversation
MingEn82
reviewed
Feb 1, 2023
| System.out.println("What are your orders?"); | ||
| System.out.println("Goodbye master, let's meet again soon..."); | ||
| } | ||
| } |
| System.exit(0); | ||
| } | ||
| } | ||
| } |
| System.out.println(". " + taskList[i]); | ||
| } | ||
| } | ||
| } |
| public void setDescription(String description) { | ||
| this.description = description; | ||
| } | ||
| } |
| taskList[taskIndex - 1].setDone(false); | ||
| System.out.println("Roger that! This task is marked as done: "); | ||
| System.out.println("[ ] " + taskList[taskIndex - 1].getDescription()); | ||
| } |
# Conflicts: # src/main/java/HinaBot.java
bdthanh
reviewed
Feb 14, 2023
bdthanh
left a comment
There was a problem hiding this comment.
Just a few coding violation in your code, good job! You can think of splitting the HinaBot into smaller classes that each one have a different responsibility. Good luck on your upcoming levels
Comment on lines
+31
to
+32
| } | ||
| else { |
There was a problem hiding this comment.
else should be on the same line with }
| if (super.isDone()) { | ||
| mark = "X"; | ||
| } | ||
| else { |
Comment on lines
+35
to
+56
| public static void handleCommand(String command) throws HinaException { | ||
| if (command.equalsIgnoreCase("bye")) { | ||
| System.out.println("Goodbye master, let's meet again soon..."); | ||
| System.exit(0); | ||
| } else if (command.equalsIgnoreCase("list")) { | ||
| listTasks(); | ||
| } else if (command.split(" ")[0].equalsIgnoreCase("mark")) { | ||
| int taskIndex = Integer.parseInt(command.split(" ")[1]); | ||
| markTask(taskIndex); | ||
| } else if (command.split(" ")[0].equalsIgnoreCase("unmark")) { | ||
| int taskIndex = Integer.parseInt(command.split(" ")[1]); | ||
| unmarkTask(taskIndex); | ||
| } else if (command.split(" ")[0].equalsIgnoreCase("todo")) { | ||
| addTask(command.substring(5)); | ||
| } else if (command.split(" ")[0].equalsIgnoreCase("deadline")) { | ||
| addDeadline(command.substring(9)); | ||
| } else if (command.split(" ")[0].equalsIgnoreCase("event")) { | ||
| addEvent(command.substring(6)); | ||
| } else { | ||
| throw new HinaException(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Good job of splitting a big method into smaller one and improving your code quality
…access levels in Task class
# Conflicts: # src/main/java/hina/HinaBot.java # src/main/java/hina/task/Event.java
Fixed bugs: 1. trailing whitespaces leading to storing blank information in Deadline and Event objects. 2. taskList now saves to the hard disk after marking and unmarking tasks.
…tions in taskList.
Add date-time format support
Add method to search for items in taskList
…command-line message outputs to methods in Ui class.
Add JavaDoc documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.