Class Square

java.lang.Object
  |
  +--TwoDThings
        |
        +--Square
Direct Known Subclasses:
Cube

public class Square
extends TwoDThings

This class implements a Square class.


Fields inherited from class TwoDThings
nObjects
 
Constructor Summary
Square(int _length)
          Constructor.
 
Method Summary
 int area()
          Calculates the area of a square.
 
Methods inherited from class TwoDThings
getType, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Square

public Square(int _length)
Constructor. initialize lenght and width values of a Square
Parameters:
_width - int _width of the square
Method Detail

area

public int area()
Calculates the area of a square.
Returns:
area int area of the square