Create a task management system that uses Java collections, handles exceptions, processes dates with LocalDate, and uses streams for data filtering and transformation.
Write a Java program that:
-
Defines a Task class with fields for task description, due date, and priority (from 0 to 5).
-
Manages a collection of tasks.
-
Handles potential exceptions, such as invalid date formats.
-
Filters and sorts tasks using streams based on the due date and priority.
-
Prints tasks that are due today or overdue.
-
Define the Task class with appropriate fields and methods.
-
Create a class to manage the collection of tasks.
-
Implement methods to add tasks, handle exceptions, and process tasks using streams.
-
Filter and sort tasks based on the due date and priority.
-
Print tasks that are due today or overdue.
- Added a system to generate random tasks in future and in past to create test cases