Package amadeus.workspace
package amadeus.workspace
Provides the core task management functionality for the Amadeus application.
This package includes classes that represent tasks and manage the task list. It supports
different types of tasks, such as ToDo, Deadline, and Event, and
provides methods to add, mark, delete, and reset tasks. The TaskList class ensures
that changes to the task list are saved to the database and communicated to the user.
Key Classes
Task: Abstract base class representing a generic task.TaskList: Manages the list of tasks and provides methods to add, mark, delete, and reset tasks.ToDo: Represents a simple task with no specific date or time constraints.Deadline: Represents a task with a specific deadline.Event: Represents a scheduled event task with a start and end time.
Usage Example
// Create and add tasks to the task list
TaskList.addToDo(new ToDo("Buy groceries"));
TaskList.addDeadline(new Deadline("Submit report", LocalDate.of(2025, 12, 31)));
TaskList.addEvent(new Event("Team meeting", LocalDateTime.of(2025, 1, 1, 11, 59), LocalDateTime.of(2025, 1, 2, 12, 0)));
// Mark a task as complete
TaskList.markDone(1, true);
// Delete a task
TaskList.deleteTask(2);
// Reset the task list
TaskList.resetList();
-
ClassesClassDescriptionRepresents a task with a specific deadline.Represents a scheduled event task with a start and end time.Abstract base class representing a generic task.Manages the list of tasks in the Amadeus application.Represents a simple task with no specific date or time constraints.