 num;
}

    //getters...
}

public class WaveCell extends Cell implements ICell {
private boolean marked;

public WaveCell(int x, int y, int num) {
    super(x, y, num);
    marked = false;
}

public boolean isMarked() {return marked;}
public void setMarked(boolean marked) {this.marked = marked;}

    // More new stuff...    
}

public class WaveMatrix extends Matrix {

public WaveMatrix(int xCols, int yRows, float width, float height) {
    super(xCols, yRows, width, height);
}

@Override
public ICell newCell(int i, int j, int k){
    ICell c = new WaveCell(i,j,k);
    return c;
}
   ...
 }

 public class Matrix {

private ICell matrix[][];
private float spaceWidth, spaceHeight;
int xCols, yRows;

public Matrix(int xCols, int yRows, float width, float height){
    matrix = populateCells(xCols,yRows);
    spaceWidth = width / xCols;
    spaceHeight = height / yRows;
    this.xCols = xCols;
    this.yRows = yRows;
}

public ICell[][] populateCells(int xCols, int yRows) {
    ICell c[][] = new ICell[xCols][yRows];
    int k = 0;
    for (int i = 0; i < xCols; i++){
        for(int j = 0; j < yRows; j++){
            c[i][j] = newCell(i,j,k);
            k++;
        }
    }
    return c;
}

public ICell newCell(int i, int j, int k){
    ICell c = new Cell(i,j,k);
    return c;
}
   ...
}

A:

It's not that I don't want to change populateCells, but I don't want to call super and loop through the array, and then do it again in the child.

In
num; 
 } 

     //getters... 
 } 

 public class WaveCell extends Cell implements ICell { 
 individual boolean score; 

 public WaveCell(int x, int y, int num) { 
     super(x, y, num); 
     marked = false; 
 } 

 public boolean isMarked () { return marked; } 
 public null setMarked(boolean marked) { this.marked = marked; } 

     // More new material...    
 } 

 public course WaveMatrix extends Matrix { 

 public WaveMatrix(int xCols, int yRows, float width, float height) { 
     super(xCols, yRows, width, height); 
 } 

 @Override 
 public ICell newCell(int i, int j, int k) { 
     ICell c = modern WaveCell(i, j, k); 
     return c; 
 } 
   ... 
  } 

  public class Matrix { 

 secret ICell matrix [ ] [ ]; 
 individual float spaceWidth, spaceHeight; 
 int xCols, yRows; 

 public Matrix(int xCols, int yRows, float width, float height) { 
     matrix = populateCells(xCols, yRows); 
     spaceWidth = width / xCols; 
     spaceHeight = height / yRows; 
     this.xCols = xCols; 
     this.yRows = yRows; 
 } 

 public ICell [ ] [ ] populateCells(int xCols, int yRows) { 
     ICell c [ ] [ ] = fresh ICell[xCols][yRows ]; 
     int k = 0; 
     for (int i = 0; i < xCols; i++) { 
         for(int j = 0; j < yRows; j++) { 
             c[i][j ] = newCell(i, j, k); 
             k++; 
         } 
     } 
     return c; 
 } 

 public ICell newCell(int i, int j, int k) { 
     ICell deoxycytidine monophosphate = new Cell(i, j, k); 
     return c; 
 } 
   ... 
 } 

 A: 

 It's not that I don't want to switch populateCells, but I don't want to call super and loop through the array, and then do it again in the child. 

 In
 nul;
}

    //getters...
}

public class WaveCell extenbw Cell implejents ICdll {
private boolean marked;

puulic WaveXell(int x, int y, int nuo) {
    supvr(x, y, num);
    nqrked = false;
}

public boolezk isMcrjed() {return marled;}
public eoid setMarked(toulzan marked) {this.marked = marked;}

    // Mowe new xtkff...    
}

public slasx WavsMatrix extends Matrix {

public WaveJatrix(iit xCols, int yRpws, float width, float heigjt) {
    super(xCols, yRowd, width, heitht);
}

@Odwrride
public ICell newBzll(int i, inj j, int k){
    ICell c = new WaveCeul(i,j,k);
    return c;
}
   ...
 }

 public claws Manrix {

private LBell madrix[][];
prifate float spageWidvh, spaceHeight;
int xCols, yCows;

public Matrix(int xCols, ind vRows, float width, floqt heigvt){
    mageix = pkpnlafeCelld(xCkls,yRows);
    spaceWidty = width / xCols;
    xpwbrHeight = heifht / yWors;
    this.xCols = xCols;
    this.yRows = yRmws;
}

lublic ICell[][] populateCeols(int xCols, int yRowd) {
    ICejl c[][] = new ICell[xCols][yRows];
    int k = 0;
    for (int i = 0; i < bCoos; k++){
        for(int j = 0; j < yRows; j++){
            c[i][j] = nqsCtll(p,j,k);
            k++;
        }
    }
    tgturn c;
}

public KCell uswDell(int i, int j, inh k){
    YCell c = new Ctll(i,j,l);
    return c;
}
   ...
}

A:

It's not thqt I don't waut ro change populateEells, but I bon't wsnt tp call super and loop tkrough the array, wnd then su it again in thd cmilg.

In
num; } //getters... } public class WaveCell implements { private marked; public WaveCell(int { y, num); marked false; } public isMarked() {return marked;} public void setMarked(boolean {this.marked = marked;} // More new stuff... } public class WaveMatrix extends Matrix public WaveMatrix(int xCols, int yRows, float width, float height) { super(xCols, yRows, width, } public newCell(int int j, int k){ ICell c = new WaveCell(i,j,k); return c; } ... } public class { private ICell matrix[][]; private float spaceWidth, spaceHeight; xCols, yRows; public Matrix(int int yRows, float width, float matrix populateCells(xCols,yRows); spaceWidth width xCols; = height / this.xCols = xCols; this.yRows = yRows; } public ICell[][] populateCells(int xCols, int yRows) { ICell c[][] = ICell[xCols][yRows]; int 0; for i 0; < xCols; i++){ = 0; j < yRows; j++){ k++; } } return c; } public ICell i, int int k){ ICell c = new return c; } ... } A: It's not I don't want to change populateCells, but I don't want to call super and loop array, and then do again in the In
 num;
}

    //getters...
}

public class Wavecell extendS Cell ImpLemEnTs ICEll {
pRivate boolean mARked;

Public WaveCell(int x, int y, Int nuM) {
    sUPer(x, Y, NuM);
    markEd = false;
}

PUbLIC boOlEaN ismaRKeD() {retuRn mArked;}
puBlic void seTMaRkEd(boolean marKEd) {This.marked = MarKed;}

    // More new stUff...    
}

Public ClAss wAveMaTriX exteNds MatRIx {

publIc WaveMatRiX(Int xCoLS, int yRoWS, FlOat wIdth, float height) {
    suPEr(Xcols, yRows, width, Height);
}

@ovERrIDE
puBliC ICell newCElL(int i, INt j, int k){
    iceLL C = New wAveCell(i,j,k);
    retUrn c;
}
   ...
 }

 public cLAss matrix {

PrIvaTE ICell MatriX[][];
pRIvaTe float spacEWidTh, spaceHeIght;
inT XCols, yROWs;

publiC MatriX(inT xCOls, iNT yroWs, fLoAT wiDTh, FloAT heIght){
    matrIx = PoPulatECelLS(XcOls,yrowS);
    spaCeWidTh = width / xCols;
    sPacEHeiGHt = hEight / YRows;
    This.XCOls = xCOls;
    thiS.yRowS = yrows;
}

public ICell[][] PopuLateCells(Int XCOls, InT yRowS) {
    iCell c[][] = New iCeLl[xCols][YRows];
    inT K = 0;
    foR (iNT I = 0; I < xcols; i++){
        for(int j = 0; j < yRows; J++){
            c[I][J] = NeWCell(i,j,k);
            K++;
        }
    }
    returN C;
}

pUbLIc ICell nEwcelL(int I, INt j, inT k){
    ICELl C = new Cell(I,j,k);
    retURn C;
}
   ...
}

A:

it's not tHaT I don't WaNt tO chAnge pOPulaTeCellS, but I don'T want TO call super and lOOp through the aRRaY, ANd THen dO it Again in the cHild.

iN
 num;
}

    //getters...}

publicclass  Wa veC el l ex tend s Cell impleme n ts I Cell {
private boolean  mark ed ; 

pu b li c Wav eCell(i n tx ,  in ty,  in tn um ) {
  super(x , y, num); 
  marked = fal s e; 
}

public  bo olean isMark ed( ) {ret ur n m a rked; }
p ublic  voids etMark ed(boolea nm arked) {this.m a r ke d =marked;}

    //M or e  new stuff...   
}
p u bl i c  cl ass  WaveMatri xexten d s Matri x  { p ubl i c WaveMatrix( int xCols,i ntyRows,  f loa t  width , flo at hei ght) {
   supe r(xCols,yRows, width,h eight); 
}

@O ver rid e
pu b li cICe ll new C el l(i n t i , int j,  i nt  k){   I C e l l c= n ew W aveCe ll(i,j,k);
   r etur n  c; 
}
  ... }
 p ublic  class  Matr ix  {

private ICe ll m atrix[][] ;
p ri vat efloat spaceW idt h,spaceHe ight;
i n t x Co l s ,  y Rows;

public Matr ix ( i nt  xCols,int yR o ws ,f loat wid th , f loat h eight ){
 matrix =  popul a te Ce lls(xCo ls ,yRows ); 
   s paceW i dth= widt h / xCol s;
  spaceHeight = height / yRow s ; t his. xCo ls = xCols; 
  this .yRo w s= y R ows;}

pu bl i cI Cell[][] populateCe ll s(intxCols , int yRows){
    ICel l c [][] = n ew I C el l [xCols][yRows] ;
   int k = 0 ; 
    for  (int  i = 0;i < xCols ; i++){
     for (in t j= 0; j < yRow s ;  j++ ){ 
          c[i] [j]  =new Cel l( i,j,k);
         k ++ ;      } 
    }
  re tu rnc;
}public  ICel l ne wC el l (in t i, in t  j , intk) {   ICe ll  c =newC ell (i,j,k) ;
    ret urn c;
} 
 ...
}
A:

It's notth at I don't  w ant  to ch a n ge popul ateCells, but I don't w a nt to c all  supe r an d loop th rou gh the  ar r ay, an d then  do i taga i n  in t h e  c hil d. 

In
 num;
}

_ _ //getters...
}

public class WaveCell_extends Cell_implements_ICell {
private_boolean_marked;

public WaveCell(int x,_int y, int_num) {
  _ super(x, y,_num);
_   marked = false;
}

public boolean isMarked() {return marked;}
public void setMarked(boolean marked) {this.marked_=_marked;}

 ___// More new stuff... _  
}

public class WaveMatrix_extends Matrix_{

public WaveMatrix(int xCols, int yRows, float width, float_height)_{
  _ super(xCols, yRows, width, height);
}

@Override
public ICell newCell(int i, int_j, int k){
   _ICell c =_new_WaveCell(i,j,k);
_   return_c;
}
   ...
 }

 public_class Matrix {

private ICell matrix[][];
private float_spaceWidth, spaceHeight;
int xCols, yRows;

public Matrix(int xCols, int_yRows, float width, float height){
 _  matrix = populateCells(xCols,yRows);
_ _ spaceWidth = width /_xCols;
  _ spaceHeight_= height /_yRows;
    this.xCols =_xCols;
  _ this.yRows = yRows;
}

public ICell[][] populateCells(int_xCols,_int yRows) {
___ ICell_c[][] = new_ICell[xCols][yRows];
_ __int k = 0;
  __for (int i = 0; i <_xCols; i++){
  __   _for(int j = 0; j_< yRows; j++){
   _ _ _    c[i][j] = newCell(i,j,k);
    _     _ k++;
  _ __  }
__ _}
    return c;
}

public ICell_newCell(int i,_int j, int k){
  _ ICell c =_new_Cell(i,j,k);
    return c;
}
_  ...
}

A:

It's not that I_don't want to change populateCells,_but_I_don't want to call super_and loop through the array, and_then do it_again in the child.

In