I have multiple shapes to draw such as rectangle, square, circle etc, and this number of shapes can increase to 20 or more than that. Do I have to create different classes for all these shapes and implement Shape. This method would give me lots of classes which I don't prefer.
Is there any design pattern that can better handle such situation?
We have shapes like this , with different object inside each shape. Diagram