- Collecting input
- Performing work
- Delivering output
- Handling failures
Methods should group these parts together and in that particular order. When these parts of a method are mixed-up, it causes extra congnitive overload (like trying to read a choose your own adventure book from start to end).
- A fundamental feature of OOP is sending messages (SM)
- Identify the messages to perform a task
- Identify the roles that receive those messages
- Map those roles onto existing objects.
- Roles are duck types
- Switch statement smell