You are assigned to implement a complex object creation scenario where the object’s construction process should be separate from its representation. Which design pattern would you use?

  • Decorator Pattern
  • Factory Pattern
  • Prototype Pattern
  • Singleton Pattern
The Factory Pattern is used to create objects with a separation between the construction process and the representation. Factories encapsulate object creation, making it easier to change or extend object creation logic.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *