Question: 1 . Task Class: Create a Task class that stores the following information: String description: A brief description of the task. String dueDate: The due

1. Task Class:
Create a Task class that stores the following information:
String description: A brief description of the task.
String dueDate: The due date of the task in the format "YYYY-MM-DD".
Include appropriate constructors, getter methods, and a toString() method to easily display task information.
2.TaskList Class Using a Singly Linked List:
Implement a TaskList class to store tasks in a singly linked list. You will need to implement the following methods:
void addTask(Task task): Adds a task to the end of the linked list.
Task removeTask(String description): Removes and returns the task with the given description. If the task is not found, return null.
Task findTask(String description): Searches for and returns the task with the given description, or null if not found.
int getSize(): Returns the number of tasks in the linked list.
void printAllTasks(): Prints out all tasks currently in the list.
3.Algorithm Analysis:
Analyze the time complexity of the following operations:
Insertion (addTask) in the linked list.
Removal (removeTask) in the linked list.
Searching (findTask) for a task in the linked list.
Write a short paragraph for each operation describing its time complexity and explaining why it performs the way it does. This write-up should be a PDF file in the main turn-in folder. It should be named "analysis.pdf".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!