Define a class Box to represent rectangles and squares. Four data fields should represent the coordinates of a box’s upper left corner and the box’s dimensions. Give the class two constructors, including a default constructor. In addition to appropriate accessor and mutator methods, give the class methods that return a box’s area and perimeter, as well as one that draws the box. The method toString should return the values of a box’s instance variables as a string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here