Rectangle Class
Part 1: Make the Rectangle Class
- Make two instance variables: width and height. They will be integers.
- Make two constructors. One makes the default be a width of 3 and a length
of 4. The other takes what the user passes in and assigns it to the width
and height.
- Make all of the accessors (getWidth, getHeight, toString)
- Make all of the mutators (setWidth, setHeight)
- Make equals and compareTo.
- Make perimeter. It has no parameters, but returns the perimeter.
- Make area. It has no parameters, but returns the area.
- Make isSquare. It returns true if the reectangle is a square, false otherwise.
Part 2: Make the RectangleRunner
Class
- Call all of your methods.
- That should be 12 methods.