Multiple choice technology architecture

Which Pattern is used when it must be decided at run time which one of the several compatible classes is to be instantiated?

  1. Singleton Pattern

  2. Façade Pattern.

  3. Factory Pattern.

  4. Adapter Pattern.

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

The Factory Pattern is specifically designed to defer object instantiation to subclasses or factory methods, allowing the decision of which compatible class to instantiate to be made at runtime based on conditions or configuration. Singleton ensures only one instance exists, Facade provides a simplified interface to a complex subsystem, and Adapter makes incompatible interfaces work together - none of these primarily address runtime instantiation decisions.