|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Rectangle
A class that manages a rectangle given the length and width.
| Constructor Summary | |
Rectangle(double length,
double width)
Create a new rectangle object given the length and width of the rectangle. |
|
| Method Summary | |
double |
getArea()
Return the area of the rectangle. |
double |
getLength()
Return the length of the rectangle. |
double |
getPerimeter()
Return the perimeter of the rectangle. |
double |
getWidth()
Return the width of the rectangle. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Rectangle(double length,
double width)
length - length of the rectangle. Must be greater than 0.width - width of the rectangle. Must be greater than 0.| Method Detail |
public double getLength()
public double getWidth()
public double getPerimeter()
public double getArea()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||