Rectangle Methods
- Rectangle(point1, point2)
-
Constructs a rectangle having
opposite corners at point1 and point2.
Example: aRectangle = Rectangle(Point(1,3), Point(4,7))
- getCenter()
- Returns a clone of the center point of the
rectangle.
Example: centerPoint = aRectangle.getCenter()
- getP1(), getP2()
- Returns a
clone of the corresponding point used to construct the rectangle.
Example: cornerPoint = aRectangle.getP1()
zelle
2016-08-26