design patterns Decorator and Composite