You need to be a bit more specific about whats going wrong. I can see a syntax error for a missing comma where you instantiate the shapes.
new Sphere (shapes[index] Integer.parseInt(myFields[c_xCoordinateField]),
It looks like you have to read 4 parameters and based on their values you instantiate shapes. Tell us what compiling issues you faced and post the constructors of your shapes if possible. Also you need to assign the shapes[index] to a shape, not include them in the method call. Add the default else for the error message too.