Java Mini Project
Java Mini Project
Methodology:
User Interface (UI):
Data Management:
A Task class will store the task name and its description.
The TaskManager class will maintain a collection of tasks using a list (ArrayList). This
class will handle the operations of adding, removing, and displaying tasks.
Add Task: When the user chooses to add a task, they will be prompted to input the
task's name and description. The new task will then be added to the list.
Remove Task: The user can remove a task by specifying its name. If the task is
found, it will be removed from the list.
Display Tasks: This will display all tasks currently in the list, showing both the name
and description of each task.
Data Structure:
The TaskManager class will use an ArrayList to store the tasks. This will allow easy
addition and removal of tasks, as ArrayLists are dynamic in size and easy to
manipulate.
The user will interact with the system through a menu-driven interface.
The program will keep running until the user chooses to exit.
Error handling will be included to deal with invalid inputs or attempts to remove a
non-existing task.
Algorithm:
Start the program.
Show options for adding a task, removing a task, displaying tasks, and exiting.
If not found, notify the user that the task does not exist.
Print all tasks in the list, displaying their names and descriptions.
Code
import java.util.Date;
// Constructor
this.taskName = taskName;
this.description = description;
this.priority = priority;
this.deadline = deadline;
this.isCompleted = false;
return taskName;
return priority;
return deadline;
return isCompleted;
this.isCompleted = true;
@Override
return "Task Name: " + taskName + "\nDescription: " + description + "\nPriority: " + priority
+