Design a system enabling to display visual objects on a screen. A visual object can be composed with one or more texts or images. If needed, the system must allow to add to this object a vertical scrollbar, an horizontal scrollbar, an edge and a menu (these additions may be cumulated).
In this solution, if we add a new decoration, there is no code modification. Moreover, the decorators are able to decorate themselves.
Except for adding a new Decorator, this solution is not so bad
In this solution, there is no extensibility possibilities, no maximal factorisation between decorators and objects to decorate, and a decorator can't be decorated by another decorator
In this solution, we cannot manage the decoration during the execution.
In this solution, it is not possible to add or to remove a object to decorate withtout doing code mofication. The factorisation between decorators and objects to decorate is not maximal. Moreover, a decorator cannot be decorated by another decorator.
This solution cannot manage the decoration during the execution, and there is some problems concerning the extensibility and the decoupling.
This solution presents problems on decoupling and extensibility.
This solution is not so bad, except for the decoration of a decorator.