Difference between revisions of "Template Method Pattern"

From Logic Wiki
Jump to: navigation, search
(Created page with "Category:Extreme Programming Category:Design Patterns Category:OOP == Video == [https://www.youtube.com/watch?v=7ocpwK9uesw https://www.youtube.com/watch?v=7ocpwK...")
 
 
Line 9: Line 9:
 
In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods. Its subclasses can override the method implementation as per need but the invocation is to be in the same way as defined by an abstract class. This pattern comes under behavior pattern category.
 
In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods. Its subclasses can override the method implementation as per need but the invocation is to be in the same way as defined by an abstract class. This pattern comes under behavior pattern category.
  
[[File:TemplateMethodPattern.png]]
+
[[File:TemplateMethodPattern.gif]]

Latest revision as of 16:03, 31 January 2019


Video

https://www.youtube.com/watch?v=7ocpwK9uesw

Definition

In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods. Its subclasses can override the method implementation as per need but the invocation is to be in the same way as defined by an abstract class. This pattern comes under behavior pattern category.

TemplateMethodPattern.gif