Skip to content
Sharp

Design patterns · interview question

How would you explain a common architectural smell that suggests the need for the Factory Pattern in an interview?

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

Correct answer

D. Complex object creation logic scattered across multiple classes.

Why

When complex object creation logic is scattered across multiple classes, it can be difficult to manage and maintain. The Factory Pattern centralizes this logic, making it easier to manage and extend.

Test yourself on Design patterns

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

Start free test
All Design patterns questions →