Question: java program write a Java class Circle with the following attributes. 1.Two private variable centerX and centerY (both double ), which represent the position of

java program write a Java class Circle with the following attributes.

1.Two private variable centerX and centerY (both double), which represent the position of the center of the circle.

2.A private variable radius (double), which represents the radius of the circle.

3.A default constructor that initializes all the private variables to zero.

4.A public method move() which takes two arguments x and y (both double), which relocate the center to point (x, y).

5.A getter and a setter for the radius.

6.A public method area() which returns the area of the circle.

7.A public method circumference() which returns the circumference of the circle.

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!