I read a Java class example on tutorial book. What is the part marked with asterisks doing? What is "create reflection of element" in java? Any analogy in C++?
its structure is like the following:
public class Element {
............... ............... .
.......blabla.. .....blabla
............... ............... .
declare variables
default constructor
constructor
accessor methods
............... ............... .
.......blabla.. .....blabla
............... ............... .
*************** *************** *************** ************
public Element createReflect() {
short [][] rMatrix = new short [height][width];
............... .......
int rVC = height -1;
int rVH = width -1;
return new Element (rMatrix, rVC, rHC);
}
*************** *************** *************** ************
}
its structure is like the following:
public class Element {
............... ............... .
.......blabla.. .....blabla
............... ............... .
declare variables
default constructor
constructor
accessor methods
............... ............... .
.......blabla.. .....blabla
............... ............... .
*************** *************** *************** ************
public Element createReflect() {
short [][] rMatrix = new short [height][width];
............... .......
int rVC = height -1;
int rVH = width -1;
return new Element (rMatrix, rVC, rHC);
}
*************** *************** *************** ************
}
Comment