- class Cell extends Shape2 {
- // Inherits all instance variables from parent + adding one
- color c;
- Cell(float x_, float y_, float w_, float h_, color(int cr_, int cg_, int cb_, int ch_) {
- super(x_,y_,w_,h_); // Call the parent constructor
- c(cr_, cg_, cb_, ch_); // Also deal with this new instance variable
- }
1