Class Circle

java.lang.Object
  extended by Circle

public class Circle
extends java.lang.Object


Field Summary
static double PI
          Contains the value of pi to four decimal places.
 
Method Summary
static double area(double radius)
          Calculates the area of a circle with the given radius.
static double circum(double radius)
          Calculates the circumference of a circle with the given radius.
static double intPow(double base, int exp)
          Calculates (base^exp), where exp is a nonnegative integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PI

public static double PI
Contains the value of pi to four decimal places.

Method Detail

circum

public static double circum(double radius)
Calculates the circumference of a circle with the given radius.

Parameters:
radius - Radius of the circle.
Returns:
Circumference of the circle.

intPow

public static double intPow(double base,
                            int exp)
Calculates (base^exp), where exp is a nonnegative integer.

Parameters:
base - Value of the base.
exp - Value of the exponent. Must be a nonnegative integer.
Returns:
Base to the power of exponent.

area

public static double area(double radius)
Calculates the area of a circle with the given radius.

Parameters:
radius - Radius of the circle.
Returns:
Area of the circle.