What is a Decorator pattern?

  1. decouple an abstraction from its implementation so that the two can vary independently

  2. One class takes in another class, both of which extend the same abstract class, and adds functionality.

  3. Assembles group of objects with same signature

  4. One class controls the creation of and access to objects in another class.


Correct Option: B

Find more quizzes: