public class Circle implements Shape, Cloneable, java.io.Serializable {
  // Constructors
  public Circle() {
    centerx=0;
    centery=0;
    radius=0;
  }

  public Circle(float x, float y, float r){
    centerx = x;
    centery = y;
    radius = r;
  }

  // Accessors
  public float getCenterx() {
    return centerx;
  }

  public float getCentery() {
    return centery;
  }

  public float getRadius() {
    return radius;
  }

  // Canonical form methods
  public boolean equals(Object other) {
    if (this==other) {
      return true;
    }

    if (other instanceof Circle) {
      Circle otherObj=(Circle) other;

      if (centerx!=otherObj.centerx) {
        return false;
      }

      if (centery!=otherObj.centery) {
        return false;
      }

      if (radius!=otherObj.radius) {
        return false;
      }

      return true;
    }

    return false;
  }

  public int hashCode() {
    int hash=0;

    hash=hash*37+(int) centerx;
    hash=hash*37+(int) centery;
    hash=hash*37+(int) radius;

    return hash;
  }

  public Object clone() throws CloneNotSupportedException {
    Circle result=(Circle) super.clone();

    return result;
  }

  public String toString(){
    String returnString;
    returnString = "Circle whose center at (" + centerx + "," + centery + ") and with radius:" + radius;
    return returnString;
  }

  // Mutators
  public void setCenterx(float f) {
    centerx=f;
  }

  public void setCentery(float f) {
    centery=f;
  }

  public void setRadius(float f) {
    radius=f;
  }

  // Fields
  protected float centerx, centery, radius;
}