Java Design Pattern: Template Method
The Template Method design pattern defines the workflow for achieving a specific operation. It allows the subclasses to modify certain steps without changing the workflow’s structure. The following example shows how Template Method pattern works. Class diagram Java Code Vehicle.java defines a vehicle and hot it works package com.programcreek.designpatterns.templatemethod; abstract public class Vehicle { … Read more