Skip to content

[Kherlen Bayasgalan] iP#82

Open
Brian030601 wants to merge 27 commits into
nus-cs2113-AY2324S1:masterfrom
Brian030601:master
Open

[Kherlen Bayasgalan] iP#82
Brian030601 wants to merge 27 commits into
nus-cs2113-AY2324S1:masterfrom
Brian030601:master

Conversation

@Brian030601

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/Duke.java Outdated
import java.util.*;
import java.util.Scanner;
public class Duke {
public static String BOT_NAME = "Amy"; // a constant bot name

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add the "final" modifier to prevent BOT_NAME from being changed at all throughout your program's runtime.

Comment thread src/main/java/Duke.java Outdated
public static void listTasks() {
System.out.println("Here are the tasks in your list:");
for (int i = 0; i < numberOfTasks; i++) {
System.out.println((i + 1) + ". " + taskList[i]); // list if the user enters list

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some of these comments are redundant as it is already made clear in your program what they are made to do

Comment thread src/main/java/Duke.java Outdated
add_List();
Scanner scanner = new Scanner(System.in);
while (true) {
String userInput = scanner.nextLine(); // Read user input

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Here is another example

Comment thread src/main/java/Duke.java Outdated
String userInput = scanner.nextLine(); // Read user input
System.out.println("____________________________________________________________");
if (userInput.equals("bye")) {
break; // Exit the loop if the user enters "bye"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As well as this

Comment thread src/main/java/Task.java Outdated
isDone = false;
}
public String getStatusIcon() {
return (isDone ? "X" : " "); // mark done task with X

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This one as well

Comment thread src/main/java/Duke.java Outdated
if (userInput.equals("bye")) {
break; // Exit the loop if the user enters "bye"
} else if (userInput.equals("list")) {
listTasks(); // list tasks

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove comments which are very obvious and keep the number of comments minimal

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