Skip to content

Conversation

@potatoems
Copy link

No description provided.

@potatoems potatoems changed the title Add basic framework for responsive chatbot [Lee Miao En Emelyn] ip Feb 4, 2025
@potatoems potatoems changed the title [Lee Miao En Emelyn] ip [Lee Miao En Emelyn] iP Feb 4, 2025
Copy link

@NhatMinh0208 NhatMinh0208 left a comment

Choose a reason for hiding this comment

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

1st review

LGTM 👍🏻 Standard mostly followed, just need to clean up a few issues.

@@ -0,0 +1,102 @@
import java.util.Scanner;

Choose a reason for hiding this comment

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

Most of the public methods and classes are missing a Javadoc comment. Perhaps you can add comments to at least the classes?

@@ -0,0 +1,102 @@
import java.util.Scanner;

public class Brownie{

Choose a reason for hiding this comment

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

I think there should be a space before the brackets here?

Comment on lines +71 to +85
throw new DukeException("Hello! Can I confirm what task you would like to note down?\n" +
"ToDo tasks must look like: todo xxxxxxxx");
}
tasks.add(taskDescription.substring(5), 'T');
System.out.println(horizontalLine);
} else if (taskDescription.startsWith("event")) {
if (scriptLength < 7) {
throw new DukeException("Hello! Can I confirm what task you would like to note down?\n" +
"Event tasks must look like: event xxxxxxxx /from xxx /to xxx");
}
tasks.add(taskDescription.substring(6), 'E');
System.out.println(horizontalLine);
} else if (taskDescription.startsWith("deadline")) {
if (scriptLength < 10) {
throw new DukeException("Hello! Can I confirm what task you would like to note down?\n" +

Choose a reason for hiding this comment

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

Can you push the + down to the following line?

public void deleteTask(int taskNumber) {
Task task = tasks.get(taskNumber);
tasks.remove(taskNumber - 1);
System.out.println("Noted. I've removed this task:\n" + task + "\nNow you have " + tasks.size() + " tasks in the list.");

Choose a reason for hiding this comment

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

This line is just a littttle bit too long. Can you split it into two?

import java.util.Scanner;

public class Brownie{
private static final String horizontalLine = "____________________________________________________________";

Choose a reason for hiding this comment

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

This is a constant, right? So I think the name should be HORIZONTAL_LINE?

Comment on lines +10 to +11
String greeting = "\nHello! I'm BROWNIE\nWhat can I do for you?\n";
String farewell = "Bye. Hope to see you again soon!\n";

Choose a reason for hiding this comment

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

And these strings are constants, too?

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.

2 participants