KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Presuming I have a class named A , and I want to use the decorator design pattern. Correct me if I'm wrong, but for that to work , we'll need to create a decorator class, say ADecorator , which will hold a reference to an A instance, and all the other decorators will extend this to add functionality. I don't understand why do we have to create a decorator class, instead of using an A instance?
Tags (comma-separated)
Save Edits
Cancel