import java.awt.*;

public class ColorBall
    extends Ball
{
    private Color color;
    
    public ColorBall(double radius, Color c)
    {
	super(radius);
	setColor(c);
    }
    public Color getColor()
    {
	return color;
    }
    public void setColor(Color c)
    {
	color = c;
    }
    public void setRadius(double radius)
    {
	if (radius < 0)
	{
	    System.out.println("Can't have negative radius!");
	}
	else
	{
	    super.setRadius(radius);
	}
    }
    public String toString()
    {
 	//return super.toString();
 	return "radius=" + getRadius() + ", Color=" + color;
    }
}
