I have some problems understanding overloaded constructors...
So I created 2 constructors which are the following:
Code:
//Contructor
public Rectangle() {
storedLength = 1;
storedWidth = 1;
}
//Constructor
public Rectangle(double length, double width) {
storedLength = length;
storedWidth = width;
}
I know that the first method will set the default values, but I don't really understand how to incorporate the second one into my client code. =/ Any ideas or explanation of constructors would be appreciated.