public void Draw(Image image) { foreach (var shape in image.Shapes) { if (shape is IThreeDimensionalShape) { ThreeDimensionalDrawer.Draw(shape); } else if (shape is IShadedShape) { ShadedRectangleDrawer.Draw(shape); } else if (shape is ITwoDimensionalShape) { TwoDimensionalDrawer.Draw(shape); } } }