forked from nus-cs2103-AY2223S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved merge conflict between branch-A-CodingStandard and branch-le…
…vel-9
- Loading branch information
Showing
5 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,6 @@ public void run(Duke duke) { | |
default: | ||
task = new Task(""); // error | ||
} | ||
duke.add(task); | ||
duke.addTask(task); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package duke; | ||
|
||
/** | ||
* Represents a Command to find tasks in Duke that matches a certain keyword. | ||
*/ | ||
public class FindCommand extends Command { | ||
protected String keyword; | ||
|
||
/** | ||
* Constructor of FindCommand with keyword to match. | ||
* | ||
* @param keyword Keyword to match. | ||
*/ | ||
public FindCommand(String keyword) { | ||
this.keyword = keyword; | ||
} | ||
|
||
/** | ||
* Run the FindCommand, print all tasks in Duke that matches the keyword to the UI. | ||
* | ||
* @param duke Duke instance to run the AddCommand at. | ||
*/ | ||
@Override | ||
public void run(Duke duke) { | ||
duke.findTasks(keyword); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters