Skip to content

[waiter-palypoo] ip#193

Open
waiter-palypoo wants to merge 31 commits into
nus-cs2113-AY2223S2:masterfrom
waiter-palypoo:master
Open

[waiter-palypoo] ip#193
waiter-palypoo wants to merge 31 commits into
nus-cs2113-AY2223S2:masterfrom
waiter-palypoo:master

Conversation

@waiter-palypoo

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/HinaBot.java Outdated
System.out.println("What are your orders?");
System.out.println("Goodbye master, let's meet again soon...");
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice!

Comment thread src/main/java/HinaBot.java Outdated
System.exit(0);
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! No Coding Violations

Comment thread src/main/java/HinaBot.java Outdated
System.out.println(". " + taskList[i]);
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job!

Comment thread src/main/java/Task.java Outdated
public void setDescription(String description) {
this.description = description;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job!

Comment thread 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());
}

Copy link
Copy Markdown

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!

@bdthanh bdthanh left a comment

Copy link
Copy Markdown

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 thread src/main/java/hina/task/Task.java Outdated
Comment on lines +31 to +32
}
else {

Copy link
Copy Markdown

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 }

Comment thread src/main/java/hina/task/Event.java Outdated
if (super.isDone()) {
mark = "X";
}
else {

Copy link
Copy Markdown

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 thread src/main/java/hina/HinaBot.java Outdated
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
Copy Markdown

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