Question: Program 1 Write a class called Circle which has two constructors. The first constructor (default constructor) does not take any parameter and supplies default values

Program 1 Write a class called Circle which has two constructors. The first constructor (default constructor) does not take any parameter and supplies default values for the coordinates and the radius. The second constructor takes three doubles as parameters corresponding to the X and Y coordinates and the radius. The class must include these methods: public double circumference) returns the circumference of the circle. public double area) returns the area of the circle . public void setRadus(double r) is called in the constructor and checks the radius against a maximumlf the radius is greater than the maximurn, setRadius resets it to the maximum (using the ternary conditional operator). You may set your own maximum value public void printAttributes) prints the coordinates, the radius, the circumference, and the area. public boolean isinside(double x, double y) return true if a point represented in the parameters falls inside the circle, false otherwise. . public void move(int x, inty) moves the origin by a specified amount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
