Skip to content
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

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

waiter-palypoo
Copy link

No description provided.

System.out.println("What are your orders?");
System.out.println("Goodbye master, let's meet again soon...");
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

else {
System.out.println("Goodbye master, let's meet again soon...");
System.exit(0);
}
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! No Coding Violations

for (int i = 0; i < taskCount; i++) {
System.out.print(i + 1);
System.out.println(". " + taskList[i]);
}
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

public void setDescription(String description) {
this.description = description;
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

taskList[taskIndex - 1].setDone(false);
System.out.println("Roger that! This task is marked as done: ");
System.out.println("[ ] " + taskList[taskIndex - 1].getDescription());
}
Copy link

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!

Copy link

@bdthanh bdthanh left a 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

Comment on lines 31 to 32
}
else {
Copy link

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 }

if (super.isDone()) {
mark = "X";
}
else {
Copy link

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

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();
}
}
Copy link

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

waiter-palypoo and others added 17 commits March 1, 2023 00:41
# 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.
Add method to search for items in taskList
…command-line message outputs to methods in Ui class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants