I’m studying for an exam, and this was on an old test:
Given:
public interface Interface1 {
void method1();
void method2().
}
Show the Decorator pattern class for the interface.
What is it, and does anyone have any resources on where I can learn more about this?
http://www.javacamp.org/designPattern/decorator.html
http://en.wikipedia.org/wiki/Decorator_pattern
for your example
abstract decorator class
concrete decorator class
usage: