-
Notifications
You must be signed in to change notification settings - Fork 200
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
[waiter-palypoo] ip #193
base: master
Are you sure you want to change the base?
[waiter-palypoo] ip #193
Conversation
src/main/java/HinaBot.java
Outdated
System.out.println("What are your orders?"); | ||
System.out.println("Goodbye master, let's meet again soon..."); | ||
} | ||
} |
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.
Nice!
src/main/java/HinaBot.java
Outdated
else { | ||
System.out.println("Goodbye master, let's meet again soon..."); | ||
System.exit(0); | ||
} | ||
} | ||
} |
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.
Nice! No Coding Violations
src/main/java/HinaBot.java
Outdated
for (int i = 0; i < taskCount; i++) { | ||
System.out.print(i + 1); | ||
System.out.println(". " + taskList[i]); | ||
} | ||
} | ||
} |
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!
src/main/java/Task.java
Outdated
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
} |
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!
src/main/java/HinaBot.java
Outdated
taskList[taskIndex - 1].setDone(false); | ||
System.out.println("Roger that! This task is marked as done: "); | ||
System.out.println("[ ] " + taskList[taskIndex - 1].getDescription()); | ||
} |
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.
No coding violations at all!
# Conflicts: # src/main/java/HinaBot.java
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.
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
src/main/java/hina/task/Task.java
Outdated
} | ||
else { |
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.
else should be on the same line with }
src/main/java/hina/task/Event.java
Outdated
if (super.isDone()) { | ||
mark = "X"; | ||
} | ||
else { |
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.
Same problem with my comment in Task
src/main/java/hina/HinaBot.java
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.