class Circle extends Shape { // All of the instance variables are inherited from Shape // add a new instance variable for color color c; // In our constructor for a circle we also need // to call the constructor of the parent class 'shape' Circle(float x_, float y_, float s_, int c_) { super(x_, y_, s_); c = c_; } // We'll override the shake method, and add our // own bits of code to it. We'll still call the // parent shake() method, but we want to modify // it a bit void shake() { super.shake(); s += random(-1, 1); s = constrain(s, 5, 100); } void render() { ellipseMode(CENTER); fill(c); noStroke(); ellipse(x, y, s, s); } }