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?

  • Bridge Pattern
  • Factory Pattern
  • Observer Pattern
  • Singleton Pattern
In this scenario, you would use the Factory Pattern. The Factory Pattern separates the object's creation process from its representation, providing a method for creating objects based on certain conditions or parameters. It promotes flexibility and allows for the construction of complex objects.
Add your answer
Loading...

Leave a comment

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