State: What You Can Do Depends on Where It Is
When every method of a package starts by checking its status, a new status means editing every method, and the one you miss breaks a rule; drawing the rules as a state diagram, then giving each status its own class, puts each status's rules in one place: the State pattern.
Updated

- Category
- Data Structures
- Level
- Journeyman
- Tags
- Code Smell, OOP, State Diagram, State Pattern