classwork
Class Circle

java.lang.Object
  extended by classwork.Circle

public class Circle
extends java.lang.Object

Models a circle.

Author:
Tom James

Field Summary
private  int radius
          The distance between the center of the circle and its edge.
 
Constructor Summary
Circle(int radius)
           
 
Method Summary
 double getArea()
           
 double getPerimeter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radius

private int radius
The distance between the center of the circle and its edge.

Constructor Detail

Circle

public Circle(int radius)
Parameters:
radius - The distance between the center of the circle and its edge.
Method Detail

getArea

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

getPerimeter

public double getPerimeter()
Returns:
The circumference of the circle.