We're writing a project management system with the ability to delegate the responsibility for task tracking.
We have already finished the TaskTracker interface, which contains the following functions:
addTask(task: String)– adds a task to the list.completeTask(task: String)– marks a task as completed.getTasks()– gets the list of outstanding tasks.getCompletedTasks()– gets the list of completed tasks.
We've also written the SimpleTaskTracker class, which implements the TaskTracker interface. This class will track tasks using internal lists to store outstanding and completed tasks.
While writing the Project class, which uses class delegation to manage tasks, one of the programmers made an error, and your task is to fix the error for the correct operation of the program.