If a constructor has no arguments, then it has no values from the user to store into the classes member variables.
Its up to the programmer that defines that constructor to put values into those...
Type: Posts; User: Norm
If a constructor has no arguments, then it has no values from the user to store into the classes member variables.
Its up to the programmer that defines that constructor to put values into those...
Ok. Your code does follow the assignment statement if you read it that the class does the I/O. Another reading of the assignement could put the I/O outside the class. The intent of the statement:...
An unusual construct: not to initialize the member variables until get() is called. And ALWAYS to prompt for the sizes every time get() is called. Normally the sizes would be determined outside of...
Or
public boolean isSquare(Rectangle r)
{
return (r.getLength() == r.getHeight());
}
That would depend on how you want to use the method. Most likely you want to determine if a Rectangle is a square.
If there are other shapes that you want to test, then the parameter might be...