Design a system enabling to draw a graphic image. A graphic image is composed of lines, rectangles, texts and groups. A group may be composed of other groups, lines, rectangles and texts.
Optimal solution :
Static diagram :
This solution allows a good decoupling, and a good extensibility.
Alternative solution :
Static diagram :
This solution has no decoupling, no extensibility and the composed objects have not a uniform processing