Can you explain Template Pattern?

 Posted by ArticlesMaint on 9/26/2009 | Category: Design Pattern & Practices Interview questions | Views: 4363

In template pattern we have an abstract class which acts as a skeleton for its inherited classes. The inherited classes get the shared functionality. The inherited classes take the shared functionality and add enhancements to the existing functionality. In word or power point how we take templates and then prepare our own custom presentation using the base. Template classes works on the same fundamental.
Figure ‘Template abstract class’ shows we have created a customer class ‘ClsCustomer’ which has set/get properties. Now we can inherit from this class and create add and update customer classes.

Figure: - Template abstract class

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response