I have a small program to build a house. A house will have many floors (storeys), a storey can have many rooms, a room can contain many items. So I tend to use the Decorator Pattern for this program. Here is the initial design:
http://img337.imageshack.us/img337/5530/maina.jpg
Can you help me to improve the design?
This how wikipedia starts it’s article on the decorator pattern.
So the decorator pattern is about adding behaviour to an existing object. And items in a room are not an additional behaviour for that room.
I think, the Composite pattern would be a better choice to build a model for that domain.
(But if you still want a Decorator for your house you may find a better solution here 😉 )