Template Method

This is a UML class diagram example for the template method pattern.

Purpose

Identifies the framework of an algorithm, allowing implementing classes to define the actual behavior.

Use When

  • A single abstract implementation of an algorithm is needed.
  • Common behavior among subclasses should be localized to a common class.
  • Parent classes should be able to uniformly invoke behavior in their subclasses.
  • Most or all subclasses need to implement the behavior.
Import into your Project

Posted by: Shirley Langley

Turn every software project into a successful one.

Try Visual Paradigm for Free! Or learn more about our features.

Leave a Reply

Be the First to Comment!

avatar