Mid
From PDF
GoF Patterns
Gang of Four Patterns
Flexibility:?
Short answer: The Builder Pattern allows you to easily create different variants of an object (e.g., different types of pizzas) without changing the client code. You can add new builders for other pizza types without modifying the PizzaDirector or the Pizza class.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png