I have been looking at the decorator design pattern (I am new to the subject of design patterns), and I was wondering,
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
Decorator simply adds functionality to the class it decorates. Sorta like icing on the cake. You may decorate more than one component but that sounds more like Facede though I may be wrong. The second question - the wrapper adds functionality but it also can mask it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With