Code:
// In the constructor:
// shapeObjects = new Shape[ 10 ]; // Example length of array contains ten shapes
// numOfShapes = 0;
public void paintComponent( Graphics g ) {
// Inherit the paintComponent method from the superclass
super.paintComponent(