Class Triangolo

java.lang.Object
  extended by Triangolo
All Implemented Interfaces:
java.lang.Comparable, Poligono

public class Triangolo
extends java.lang.Object
implements Poligono


Constructor Summary
Triangolo(int p, int q, int r)
           
 
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

Triangolo

public Triangolo(int p,
                 int q,
                 int r)
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