Class Circle

java.lang.Object
  |
  +--Circle

public class Circle
extends java.lang.Object

A class that manages a circle given the radius.


Constructor Summary
Circle(double radius)
          Create a new circle object with the specified radius.
 
Method Summary
 double getArea()
          Return the area of the circle.
 double getPerimeter()
          Return the perimeter of the circle.
 double getRadius()
          Return the radius of the circle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Circle

public Circle(double radius)
Create a new circle object with the specified radius.
Parameters:
radius - radius of the circle being created. Must be positive and greater than 0.
Method Detail

getRadius

public double getRadius()
Return the radius of the circle.
Returns:
the radius of the circle.

getPerimeter

public double getPerimeter()
Return the perimeter of the circle.
Returns:
the perimeter of the circle.

getArea

public double getArea()
Return the area of the circle.
Returns:
the area of the circle.