Design Patterns, Behavioural Design, Java, Software Development.
addCondiments() { System.out.println("Adding lemon"); } } // Client code public class TemplateMethodPatternDemo { public static void main(String[] args) { Beverage coffee = new Coffee(); coffee.prepareBeverage(); Beverage tea = new Tea(); tea.prepareBeverage(); } } Real-world Use Case: Web