Class Rettangolo

java.lang.Object
  extended by Rettangolo
All Implemented Interfaces:
java.lang.Comparable, Poligono
Direct Known Subclasses:
Quadrato

public class Rettangolo
extends java.lang.Object
implements Poligono


Constructor Summary
Rettangolo(int p, int q)
           
 
Method Summary
 double area()
           
 int compareTo(java.lang.Object obj)
           
 int perimetro()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rettangolo

public Rettangolo(int p,
                  int q)
Method Detail

perimetro

public int perimetro()
Specified by:
perimetro in interface Poligono
Returns:
perimetro del poligono

area

public double area()
Specified by:
area in interface Poligono
Returns:
area del poligono

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object