Suppose the following class:
public class Sample() { private int xPos, yPos; private int xSize = 10; private int ySize = 10; // - - Sample(int xPos, int yPos, int xSize, int ySize) { this.xPos = xPos; this.yPos = yPos; this.xSize = xSize; this.ySize = ySize; } // - - Sample(int xPos, yPos) { this.xPos = xPos; this.yPos = yPos; //this.xSize = 10; //this.ySize = 10; } // etc }
... or should the second constructor be using the commented out lines instead? Or a different way?