Java, Design Patterns, Structural Design Pattern, Software Engineering.
we can use the Decorator Pattern in client code: public class CoffeeShop { public static void main(String[] args) { // Order a plain Latte Coffee latte = new Latte(); System.out.println("Ordered: " + latte.getDescription() + ", Cost: $" + latte.cost()); // Order a Latte with Milk Coffee