Skip to content

Latest commit

 

History

History

Template Method

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Template Method

Template Method pattern is to define an algorithm as a skeleton of operations and leave the details to be implemented by the child classes. The overall structure and sequence of the algorithm are preserved by the parent class.

base

For example, we will make a template method for two factor authentication, we can choose to use email authentication or phone authentication.

example

Source