# Class Circle and Method coderinme

#### Class Circle and Method coderinme

Design a class Circle and implement the following methods:
Define a circle method to compute its area
Define a circle method to compute its perimeter
Define a method that takes a given point represented by a pair of numbers and checks whether or not the point is inside the circle.
The circle class needs to have instance variables to store the radius of the circle, and the x and y coordinates of the center. Add main program to test the class Circle repeatedly, until user enters negative value for the radius of the circle.
Program:

``````import java.io.*;
class Circle
{
private double x;
private double y;
public Circle(double X,double Y,double rd)
{
x=X;
y=Y;
}
public double Area()
{
}
public double Perimeter()
{
}
public void checkPoint(double a,double b )
{
double d=Math.sqrt((x-a)*(x-a)+(y-b)*(y-b));
System.out.println("The given point is outside the circle");
else
System.out.println("The given point is inside the circle");
}
}
public class Q21
{
public static void main(String[] args) throws IOException
{
while(true)
{
System.out.print("Enter the radius of the circle to proceed or enter a negative value of radius to stop:");
if (r<=0)
break;
System.out.print("Enter the co-ordinates of the centre of the circle: ");
Circle C=new Circle(c1,c2,r);
System.out.print("Area of the circle is : "+C.Area());
System.out.println("\nPerimeter of the circle is : "+C.Perimeter());
System.out.print("Enter the co-ordinates of the point: "); 