Template Method
Template Method
Template Method, a class behavioral pattern, is way to provide general steps of a method, while deferring the implementation to its subclasses. Mostly used to encapsulate algorithms, it can help reduce code duplication and maximizes the reuse of subclasses.