All challenges
Code AnalysisIntermediate 60s

Decorator vs subclass explosion

class HttpClient { ... } class LoggingHttpClient extends HttpClient {} class RetryHttpClient extends HttpClient {} class LoggingRetryHttpClient extends HttpClient {} class RetryLoggingHttpClient extends HttpClient {} // ... 12 combinations hardcoded Which pattern should replace this and why?

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle