There is a class Task, that has its methods and properties. It is an entity in my project. A Task is just like a regular daily task, that has its date, its title, body (actual task) and status completed/not completed as well as setters and getters for described properties above.
One could add a new task, or remove a task. Filter tasks based on its properties, sort them, etc. These operations are related to a list of elements of type Task. Question: Should there be a separate class for the list of tasks and its corresponding methods related to the list? If so, what should be the relationship between Task class and TaskList class? Any design pattern or a specific approach you could recommend?
Aucun commentaire:
Enregistrer un commentaire