Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Discuss all branches of science

Answered: 1 week ago