Multiple choice technology programming languages

Which design pattern can be used to create a family of dependent objects?

  1. Factory Method

  2. Prototype

  3. Builder

  4. Abstract Factory

  5. Singleton

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The Abstract Factory pattern is specifically designed for creating families of related or dependent objects without specifying their concrete classes. When you need multiple objects that work together as a family, Abstract Factory provides a consistent interface for creating them. Factory Method creates single objects, Prototype clones existing objects, Builder constructs complex objects step-by-step, and Singleton ensures only one instance exists - none of these handle families of dependent objects.