circleClas

circleClas - { double area = PI * radius * radius; return...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class circleClass { private final double PI = 3.14159; private double radius; public circleClass (double r) { radius = r; } public circleClass () { radius = 0.0; } public void setRadius (double z) { radius = z; } public double getRadius () { return radius; } public double getArea ()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { double area = PI * radius * radius; return area; } public double getDiameter() { double diameter = radius * 2; return diameter; } public double getCircumference () { double circumference = 2 * PI * radius; return circumference; } }...
View Full Document

Ask a homework question - tutors are online