forked from nus-cs2103-AY2021S1/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.
- Loading branch information
1 parent
8f38e48
commit 6ad1551
Showing
5 changed files
with
52 additions
and
2 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
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
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,24 @@ | ||
import java.time.LocalDate; | ||
|
||
public class SnoozeCommand extends Command{ | ||
|
||
public int taskIndex; | ||
public LocalDate newDate; | ||
|
||
public SnoozeCommand(int taskIndex, LocalDate newDate){ | ||
super(); | ||
this.taskIndex = taskIndex; | ||
this.newDate = newDate; | ||
} | ||
|
||
/** | ||
* Execute the command | ||
* @param inputTasks the list of tasks used | ||
* @param storage the storage used | ||
*/ | ||
public void execute(TaskList inputTasks, Storage storage, Ui ui){ | ||
assert taskIndex > 0; | ||
inputTasks.snooze(taskIndex, newDate, ui); | ||
storage.writeToFile(inputTasks); | ||
} | ||
} |
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