Design a system enabling to draw a graphic image. A graphic image is composed of lines, rectangles, texts and images. An image may be composed of other images, lines, rectangles and texts.
Optimal solution :
Static diagram :
This solution allows a good decoupling, and a good extensibility.
Alternative solution :
Static diagram :
In this solution, there is no decoupling, no extensiblity. Except for the composition managing, there is no uniform protocol