public class Circle { // Represents a circle with center // at the point (centerX, centerY) // and with the specified radius private double centerX; private double centerY; private double radius; public Circle(double x, double y, double r) { centerX = x; centerY = y; radius = r; } public Circle(double r) { centerX = 0; centerY = 0; radius = r; } public Circle() { centerX = 0; centerY = 0; radius = 1d; } // area() returns the area of the circle public double area() { double area = Math.PI * radius * radius; return area; } // scale() enlarges/shrinks this circle public void scale(double factor) { radius = radius * factor; } // bigger() returns the circle with the largest area public Circle bigger(Circle other) { if (this.area() > other.area()) return this; else return other; } // the mystery method does something unclear // Hint: in circles r2 = x2 + y2 public boolean mystery(double x, double y) { double z = (x-centerX)*(x-centerX); z = z + (y-centerY)*(y-centerY); return (z < radius*radius); } }