All pastes #623821 Raw Edit

Untitled

public java v1 · immutable
·published 2007-07-17 21:23 UTC
rendered paste body
/* * Determines Area and Circumference of a Circle */import java.lang.Math;public class Circle {    private double circleRadius;    /*     * Constructs the circle     * @param radiusOfCircle The Radius of the Circle     */    public Circle(double radiusOfCircle) {        this.circleRadius = radiusOfCircle;    }    /*     * Returns the Area     * @return The area of the circle     */    public double getArea() {        return Math.PI * (this.circleRadius * this.circleRadius);    }    /*     * Returns the perimeter     * @return The perimeter of the circle     */    public double getPerimeter() {        return Math.PI * (2 * this.circleRadius);    }}