Simple Factory: One Place That Says new
When the same if chain that picks a class is copied into several places, a new product means editing all of them, and one is always forgotten; a simple factory moves that decision into one function, so a new product is one new class and one new line.
Updated

- Category
- Data Structures
- Level
- Apprentice
- Tags
- Code Smell, Factory Pattern, OOP, Simple Factory