
Template method pattern
The Template Method pattern is a way to define a general process or algorithm in a base structure, leaving specific steps to be customized by subclasses. Think of it like a recipe: the overall method stays the same, but certain ingredients or steps can be changed depending on the dish. This approach ensures a consistent process while allowing flexibility for specific implementations. It promotes code reuse and organization by separating the common workflow from the unique parts that vary.