Class MyRectangle

java.lang.Object
  extended by MyPolygon
      extended by MyTetragon
          extended by MyRectangle
All Implemented Interfaces:
java.lang.Comparable<Polygon>, Polygon

public class MyRectangle
extends MyTetragon

MyRectangle.java rappresenta un rettangolo.


Constructor Summary
MyRectangle(MyPoint2D[] p)
          costruttore
MyRectangle(MyPoint2D p1, MyPoint2D p2, MyPoint2D p3, MyPoint2D p4)
          costruttore
 
Method Summary
 
Methods inherited from class MyTetragon
area, isRectangle, isSquare
 
Methods inherited from class MyPolygon
compareTo, getLines, getPoint, getPoints, perimeter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MyRectangle

public MyRectangle(MyPoint2D[] p)
costruttore

Parameters:
p - array contenente i vertici del rettangolo

MyRectangle

public MyRectangle(MyPoint2D p1,
                   MyPoint2D p2,
                   MyPoint2D p3,
                   MyPoint2D p4)
costruttore

Parameters:
p1 - primo vertice del rettangolo
p2 - secondo vertice del rettangolo
p3 - terzo vertice del rettangolo
p4 - quarto vertice del rettangolo
Throws:
java.lang.IllegalArgumentException - se il quadrilatero non e' un rettangolo