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)
write a client class named CircleClient. It should create an object of class Circle and initialize it to (10.5) AND radius . Print out its circumference and area. If point (5,7) lies within the circle print"(5,7) lies within the circle" else print"(5,7) doesnot lie within he circle".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
