<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
public class Circle extends Shape {
	protected double radius;
	
	public Circle(double x, double y, double radius) {
		super(x,y);
		this.radius = radius;
	}

	/** Two circles are equal if they have the same center and radius. */
	public @Override boolean equals(Object other) {
		if (!(other instanceof Circle))
			return super.equals(other);

		return super.equals(other)
		    &amp;&amp; this.radius == ((Circle) other).radius;
	}

	// Note: Subclass specs should be more specific than, but not different
	// from, the superclass spec.  Often they are the same.  I usually just
	// put a reference to the superclass spec for overridden methods.
	/** @see Shape.getArea */
	public @Override double getArea() {
		return Math.PI * this.radius * this.radius;
	}
}
</pre></body></html>