**Create a Java class named “Circle” that implements java.io.Serializable interface and models a circle based on radius. Radius cannot be less than zero. Implement the getter and setter method for radius. Also include an overriding of toString in the circle class. Create the class' comparator which compares two objects of type Circle.**

This is what I have so far

```
import java.io.Serializable;

public class Circle implements Serializable, Comparable<Circle> {

private int radius = 1;

public Circle() {
}

public Circle(int radius) {
    setRadius(radius);

}

public void setRadius(int v) {
    if (v > 0) {
        this.radius = v;
    }

}

public int getRadius() {
    return this.radius;

}

@Override
public String toString() {
    return "Circle{" + "radius=" + radius + '}';
}

@Override
public int compareTo(Circle o) {
    //no idea what to put here

}

}

```

This my comparator class

```
 import java.util.Comparator;

public class CompareCircle implements Comparator<Circle> {

CompareCircle(Circle c1, Circle c2) {

}

@Override
public int compare(Circle o1, Circle o2) {
    if (o1.getRadius() > o2.getRadius()) {
        return o1.getRadius();
    } else {
        return o2.getRadius();
    }

}
}

```

My question is did I do this right or no?