Q.

When would you use the GOF Decorator design pattern?

A. to translates an existing class interface into a compatible target interface
B. to assign more functionality to an object without sub-classing it
C. to decouple an abstraction from its implementation so that the two can vary independently
D. to nest layers of decorators to add more functionality
Answer» B. to assign more functionality to an object without sub-classing it
3k
0
Do you find this helpful?
28

Discussion

No comments yet