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 :
No decoupling, no extensibility, but there is a good effort on uniform processing