Decorator favors composition over modifying the original class.

Practice this question from Quiz: Design Patterns, with options and an explanation.

Question

Decorator favors composition over modifying the original class.

Option A — Correct answer

True

Decorator composes behavior around an object while preserving the same contract.

Option B

False

Decorator composes behavior around an object while preserving the same contract.

Quiz: Design Patterns

All questions · Previous question · Next question

Open on QuizMaker