|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMyPolygon
MyTriangle
public class MyTriangle
MyTriangle.java rappresenta un triangolo. Realizza l'interfaccia Polygon.java.
Constructor Summary | |
---|---|
MyTriangle(MyPoint2D[] p)
costruttore |
|
MyTriangle(MyPoint2D p1,
MyPoint2D p2,
MyPoint2D p3)
costruttore |
Method Summary | |
---|---|
double |
area()
calcola l'area del triangolo |
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 |
---|
public MyTriangle(MyPoint2D[] p)
p
- array contenente i vertici del triangolopublic MyTriangle(MyPoint2D p1, MyPoint2D p2, MyPoint2D p3)
p1
- primo vertice del triangolop2
- secondo vertice del triangolop3
- terzo vertice del triangoloMethod Detail |
---|
public double area()
area
in interface Polygon
area
in class MyPolygon
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |