you have a protocol that is returning the all the tasks user can do. Every task has fixed estimated reading time. Calculate the tasks user can completed with in a week. Task will be completed once user will finish it. func calculateCompletedTask() {} func showAlert(???) {}
Sigiloso
I created a dictionary where key was the day and value was the status of the task completion. I made a function to fetch all the task for the day and loop through those tasks to check if task is finished or not and then I updated its status in the dictionary. At the end I passed this dictionary to the showAlert function to show the status. I have done little bit extra but this is the highlight of what I did.