Question: Define a class named Circle. A Circle object stores a radius and the (x,y) coordinates of its center point. Each Circle object should have 3

Define a class named Circle. A Circle object stores a radius and the (x,y) coordinates of its center point. Each Circle object should have 3 private fields, x-coordinate,y-coordinate and radius. Each circle object should have the following public methods:

Circle(x,y,radius)

getX()

getY()

getRadius()

getArea()

getCircumference ()

toString()

contains(x,y)

Then write a client class named CircleClient. It should create an object of class Circle and initialize it to (10.5) and Radius to 7. Print the object Print out its circumference and area. If point(5,7) lies within the clircle print "(5,7) lies within the circle" else print "(5,7)doesnot lie within the clircle".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!