Skip to content
Sharp

Design patterns · interview question

You are using the Factory Pattern to create payment processors. However, you notice increased complexity and reduced performance. What might be a reason?

Multiple choiceHardchapter-13-curatedpremiumdesign-patternsfactory-pattern
Choose one answer
Answer and explanation

Correct answer

D. Overuse of reflection or dynamic features

Why

Overuse of reflection or dynamic features in the Factory Pattern can lead to increased complexity and reduced performance. These features, while powerful, can add a performance overhead if not used judiciously.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →