Package amadeus.cognition
Class ToDoCommand
java.lang.Object
amadeus.cognition.Command
amadeus.cognition.ToDoCommand
-
Constructor Summary
ConstructorsConstructorDescriptionToDoCommand(String input) Constructs a newToDoCommandby parsing the user input. -
Method Summary
-
Constructor Details
-
ToDoCommand
Constructs a newToDoCommandby parsing the user input.The input is expected to contain a task description. If the input is empty, an
AmadeusExceptionis thrown.- Parameters:
input- the user input containing the task description; must not benullor empty.- Throws:
AmadeusException- if the input is empty or invalid.
-
-
Method Details
-
execute
Executes the command by adding theToDotask to the task list.- Specified by:
executein classCommand- Throws:
AmadeusException- if an error occurs while adding the task.
-