What if class names are not stable? (I have the shapes Circle and Square, but may generalize later to allow ellipses and rectangles.)
Consider using a static factory: