Skip to content
Sharp

Design patterns · interview question

In an e-commerce application, how can the Strategy Pattern be over-engineered?

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

Correct answer

A. By creating a separate strategy class for each minor variation in algorithm.

Why

Over-engineering occurs when the Strategy Pattern is used excessively, such as creating a separate class for each minor variation, resulting in unnecessary complexity without significant benefit.

Test yourself on Design patterns

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

Start free test
All Design patterns questions →