Design Patterns (GoF) (50 Qs)•Part 3: Architectural Patterns & Enterprise Systems (25 - 35)
What is the Abstract Factory Pattern and how does it differ from Factory Method?
junior Leveldesign-patternsArchitectural Patterns
In Simple Words:
- Factory Method: Uses inheritance to delegate creation of a single product to subclasses.
- Abstract Factory: Uses object composition to create families of related or dependent products (e.g.,
MacButton+MacCheckboxvsWinButton+WinCheckbox) without specifying their concrete classes.