import java.util.Random;

/**
 * A circle has a center and a radius.
 *
 * @version 1.1    March 21, 2002
 * @author Franck van Breugel
 * @see Point
 */
public class Circle
{
    protected Point center;  // center of this circle
    protected int radius;    // radius of this circle

    /**
     * Creates a circle with the specified center and radius.
     * 
     * @param center center of the circle.
     * @param radius radius of the circle.
     */
    public Circle(Point center, int radius)
    {
        this.center = center;
	this.radius = radius;
    }


    /**
     * Tests if the specified point is within this circle.
     *
     * @param point to be checked.
     * @return true if the the specified point is within this circle, 
     * false otherwise.
     */
    public boolean contains(Point point)
    {
        return (point.distanceTo(center) < radius);
    }

    /**
     * Returns a string representation of this circle.
     *
     * @return a string representation of this circle.
     */
    public String toString()
    {
        return "center: " + center.toString() + "\n" +
               "radius: " + radius + "\n";
    }
}
