Class Rectangle
Object
|
+--Shape
|
+--Rectangle
-
Direct Known Subclasses:
-
Square
- class
Rectangle
- extends Shape
A basic rectangle class, inherits from Shape. This class could be considered a concrete implementation class
Author: Gabriel Reid
See:
Defined in test.js
Field Summary |
<private> int |
height
Value to represent the height of the Rectangle |
<private> int |
width
Value to represent the width of the Rectangle. |
Constructor Summary |
Rectangle
(<int> width, <int> height )
Create a new Rectangle instance.
|
Method Summary |
int
|
getArea()
Get the value for the total area of this Rectangle
|
String
|
getClassName()
Get the type of this object.
|
int
|
getHeight()
Get the value of the height for the Rectangle.
|
int
|
getWidth()
Get the value of the width for the Rectangle
|
void
|
setHeight(<int> height)
Set the height value for this Rectangle.
|
void
|
setWidth(<int> width)
Set the width value for this Rectangle.
|
height
<private> int height
Value to represent the height of the Rectangle
width
<private> int width
Value to represent the width of the Rectangle.
Text in bold and italic and a
link to SourceForge
Rectangle
Rectangle(<int> width, <int> height )
Create a new Rectangle instance.
Parameters:
width
- The optional width for this Rectangle
height
- Thie optional height for this Rectangle
Author: Gabriel Reid
See:
getArea
int getArea()
Get the value for the total area of this Rectangle
Returns:
total area of this Rectangle
getClassName
String getClassName()
Get the type of this object.
getHeight
int getHeight()
Returns:
The height of this Rectangle
getWidth
int getWidth()
Get the value of the width for the Rectangle
setHeight
void setHeight(<int> height)
Set the height value for this Rectangle.
Parameters:
height
- The height value to be set
setWidth
void setWidth(<int> width)
Set the width value for this Rectangle.
Parameters:
width
- The width value to be set
Documentation generated by
JSDoc on Sun Apr 17 10:08:53 2005