Skip to content

Commit

Permalink
Fix Code Quality
Browse files Browse the repository at this point in the history
  • Loading branch information
bigjunnn committed Sep 22, 2019
1 parent c853e30 commit be4aa09
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/main/java/Duke.java
Expand Up @@ -19,7 +19,6 @@ public class Duke {
*/
String getResponse(String input) throws IOException {
Command c = Parser.parse(input);
assert (c instanceof Command) : "Parser did not return a command.";
return c.execute(tasks, ui, storage);
}

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/AddCommand.java
Expand Up @@ -36,7 +36,11 @@ public AddCommand(String type, String taskDescription) {
}

/**
* Executes the given task and prints the respective output.
* Executes the given add task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the executed task
*/
public String execute(TaskList tasks, Ui ui, Storage storage) throws IOException {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/DeleteCommand.java
Expand Up @@ -19,7 +19,11 @@ public DeleteCommand(int index) {
}

/**
* Executes the given task and prints the respective output.
* Executes the given delete task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the executed task
*/
public String execute(TaskList tasks, Ui ui, Storage storage) throws IOException {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/DoneCommand.java
Expand Up @@ -19,7 +19,11 @@ public DoneCommand(int index) {
}

/**
* Executes the given task and prints the respective output.
* Executes the given done task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the executed task
*/
public String execute(TaskList tasks, Ui ui, Storage storage) throws IOException {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/ExitCommand.java
Expand Up @@ -7,7 +7,11 @@
public class ExitCommand extends Command {

/**
* Executes the given task and prints the respective output.
* Executes the given exit task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the executed task
*/
public String execute(TaskList tasks, Ui ui, Storage storage) {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/FindCommand.java
Expand Up @@ -13,7 +13,11 @@ public FindCommand(String description) {
}

/**
* Executes the given task and prints the respective output.
* Executes the given find task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the executed task
*/
public String execute(TaskList tasks, Ui ui, Storage storage) {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/HelpCommand.java
Expand Up @@ -17,7 +17,11 @@ public class HelpCommand extends Command {
private static final String EVENT_MSG = "event [description] [/at] [date] - Add an event task.";

/**
* Executes the given task and prints the respective output.
* Executes the given help task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the information of the help commands
*/
public String execute(TaskList tasks, Ui ui, Storage storage) {
String output = "";
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/InvalidCommand.java
Expand Up @@ -13,7 +13,11 @@ public InvalidCommand(String errorMessage) {
}

/**
* Executes the given task and prints the respective output.
* Executes the given InvalidCommand task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the error message of the command
*/
public String execute(TaskList tasks, Ui ui, Storage storage) {

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/command/ListCommand.java
Expand Up @@ -7,7 +7,11 @@
public class ListCommand extends Command {

/**
* Executes the given task and prints the respective output.
* Executes the given List task.
* @param tasks A {@Code: TaskList} object
* @param ui A {@Code: Ui} object
* @param storage A {@Code: Storage} object
* @return A String representing the list of tasks
*/
public String execute(TaskList tasks, Ui ui, Storage storage) {

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/tasks/Task.java
Expand Up @@ -31,9 +31,8 @@ public String toString() {
}

/**
* Returns a StatusIcon, based on whether the task is completed or not.
*
* @return StatusIcon
* Returns a status icon, based on whether the task is completed or not.
* @return String representing the status icon
*/
public String getStatusIcon() {
// X to represent done, nothing to represent not done
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/DeadLineTest.java
Expand Up @@ -26,4 +26,6 @@ public void testGetStatusIcon() {
d.setAsDone();
assertEquals("X", d.getStatusIcon());
}


}

0 comments on commit be4aa09

Please sign in to comment.