November 2018
Intermediate to advanced
1150 pages
24h 11m
English
To truly understand the usefulness of separating usecases from entities, we might also want to add another entity, the fridge. In usecases like add/remove grocery item, we could change the fridge's status (empty/non-empty) whenever an item is added/removed. To achieve this, we will add entities::Fridge to our system, and call the update of its isEmpty method when a grocery item has been added/removed, and before returning the success/failure of the respective use case.
Read now
Unlock full access