|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--Shape
|
+--Rectangle
| Constructor Summary | |
Rectangle(double h,
double w)
costruisce un rettangolo a partire dalla larghezza ed altezza. |
|
| Method Summary | |
double |
calculateArea()
calcola l'area della figura su cui è invocato. |
double |
calculatePerimeter()
calcola il perimetro della figura su cui è invocato. |
void |
draw()
scrive un messaggio che identifica la figura. |
double |
getHeight()
ritorna l'altezza del rettangolo. |
double |
getWidth()
ritorna la larghezza del rettangolo. |
| Methods inherited from class Shape |
compareTo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Rectangle(double h,
double w)
h - altezza del rettangolo.w - larghezza del rettangolo.| Method Detail |
public double getHeight()
public double getWidth()
public void draw()
Shape
draw in class Shapepublic double calculateArea()
Shape
calculateArea in class Shapepublic double calculatePerimeter()
Shape
calculatePerimeter in class Shape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||