Skip to content

Commit

Permalink
Updated some errors mentioned by the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
LinWanLeii committed Sep 20, 2023
1 parent 8aca4cb commit 315a9fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/java/list/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public Task markTask(int i) throws DukeException {
}

/**
* UnMark a task as done.
* Marking the task as unmarked.
*
* @param i The index of the task.
* @return The task that is unmarked.
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
* The parser that takes the input data and checks its syntax followed bt execute it.
*/
public class Parser {

//final String UNKNOWN_COMMAND = "☹ OOPS!!! I'm sorry, but I don't know what that means :-(";

/**
* Takes the user input and calls the right command for it.
*
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/tasks/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public class Task {
private String type;
private String name;
private boolean marked;
private boolean isMarked;
private boolean isEmpty = false;

/**
Expand All @@ -15,7 +15,7 @@ public class Task {
*/
public Task(String name) {
this.name = name;
this.marked = false;
this.isMarked = false;
}
public Task() {
this.isEmpty = true;
Expand All @@ -31,14 +31,14 @@ public void setType(String type) {
* Marks a task as marked.
*/
public void markDone() {
marked = true;
isMarked = true;
}

/**
* UnMarks a task.
*/
public void unmarkDone() {
marked = false;
isMarked = false;
}
/**
* Represent the task in String.
Expand All @@ -48,6 +48,6 @@ public void unmarkDone() {
@Override
public String toString() {
assert !type.equals(" ") : "Type must be a character related to its task type";
return " [" + type + "]" + "[" + (marked ? "X" : " ") + "] " + name;
return " [" + type + "]" + "[" + (isMarked ? "X" : " ") + "] " + name;
}
}
1 change: 0 additions & 1 deletion src/main/java/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public String showClearTask() {
* @param userList The list the task is from.
*/
public String showList(TaskList userList) {
//System.out.println(lineBreak);
StringBuilder builder = new StringBuilder();
String top = ("Here are the tasks in your list:");
for (int i = 0; i < userList.size(); i++) {
Expand Down

0 comments on commit 315a9fd

Please sign in to comment.