Skip to content
Sharp

Software Architecture · interview question

A developer uses a Factory pattern to create instances of a single class based on a configuration file. Is this appropriate?

Multiple choiceHardchapter-13-curatedpremiumsoftware-architecturepattern-abuse
Choose one answer
Answer and explanation

Correct answer

A. No, it adds unnecessary complexity

Why

Using the Factory pattern to create instances of a single class often adds unnecessary complexity. The Factory pattern is most beneficial when dealing with multiple classes or when the creation logic is complex.

Test yourself on Software Architecture

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

Start free test
All Software Architecture questions →