Template method design pattern for beginners.
Problem statement – Please go through the strategy design pattern before you continue reading this article. From the strategy design pattern, we understand that; how to build an application, where you want the user to select the approach of solving/executing problem/algorithm at run time. For a moment, imagine template methods design pattern doing the same thing but in a controlled way. Let us understand it through an example, there are 4 outstanding programmers. Like you! Writing code to solve a given problem. According to the strategy design pattern , it just wants a result. Not interested in how different programmers have written their code. And what approach/strategy they have followed to solve the problem. As long as they can implement various strategies in different strategy, concrete implementation. Now those 4 programmers have joined the same software company and solves a given problem. This time as they have joined same company, all of them have ...