-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Kherlen Bayasgalan] iP #82
base: master
Are you sure you want to change the base?
Conversation
src/main/java/Duke.java
Outdated
@@ -1,4 +1,4 @@ | |||
import java.util.*; | |||
import java.util.Scanner; | |||
public class Duke { | |||
public static String BOT_NAME = "Amy"; // a constant bot name |
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.
Add the "final" modifier to prevent BOT_NAME from being changed at all throughout your program's runtime.
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 |
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.
Some of these comments are redundant as it is already made clear in your program what they are made to do
src/main/java/Duke.java
Outdated
add_List(); | ||
Scanner scanner = new Scanner(System.in); | ||
while (true) { | ||
String userInput = scanner.nextLine(); // Read user input |
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.
Here is another example
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" |
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.
As well as this
src/main/java/Task.java
Outdated
isDone = false; | ||
} | ||
public String getStatusIcon() { | ||
return (isDone ? "X" : " "); // mark done task with X |
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.
This one as well
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 |
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.
Remove comments which are very obvious and keep the number of comments minimal
* branch-Level-7: Create txt file Add Save & Load # Conflicts: # src/main/java/AMY/AMY.java
Merging PRs
* branch-Level-9: Add EmptyFindException
No description provided.