Class ToDoCommand

java.lang.Object
amadeus.cognition.Command
amadeus.cognition.ToDoCommand

public class ToDoCommand extends Command
Command to add a new ToDo task to the task list.

This command parses the user input to create a ToDo task and adds it to the list. The input is expected to contain a task description.

  • Constructor Details

    • ToDoCommand

      public ToDoCommand(String input) throws AmadeusException
      Constructs a new ToDoCommand by parsing the user input.

      The input is expected to contain a task description. If the input is empty, an AmadeusException is thrown.

      Parameters:
      input - the user input containing the task description; must not be null or empty.
      Throws:
      AmadeusException - if the input is empty or invalid.
  • Method Details