Package amadeus.cognition
Class DeadlineCommand
java.lang.Object
amadeus.cognition.Command
amadeus.cognition.DeadlineCommand
-
Constructor Summary
ConstructorsConstructorDescriptionDeadlineCommand(String input) Constructs a newDeadlineCommandby parsing the user input. -
Method Summary
-
Constructor Details
-
DeadlineCommand
Constructs a newDeadlineCommandby parsing the user input.The input is expected to contain a description and a due date, separated by
/by. If the input is empty or in an invalid format, anAmadeusExceptionis thrown.- Parameters:
input- the user input containing the task description and due date; must not benullor empty.- Throws:
AmadeusException- if the input is empty or in an invalid format.
-
-
Method Details
-
execute
Executes the command by adding theDeadlinetask to the task list.- Specified by:
executein classCommand- Throws:
AmadeusException- if an error occurs while adding the task.
-