I have been looking at the decorator design pattern (I am new to the subject of design patterns), and I was wondering,
- Can a decorator interact with more than one component?
- If A is a decorator of component B, can A have operations that B does not have?
Thank you.
1.) Yes
2.) Yes, that is the main point of a decorator pattern. To add functionality to the object it is decorating.
Decorator Pattern