Question: Help please, in java. Fle Edit View Go Tools Window Help Homework 2.pdf (1 page) Circle Class Write a class Circle that has the following
Fle Edit View Go Tools Window Help Homework 2.pdf (1 page) Circle Class Write a class "Circle" that has the following fields: Radius as a double variable; Pl as a final double variable with the value 3.14159; Write a constructor that accepts the radius ofithe circle as an argument. Write a constructor that takes no argument and sets the radius to 0.0 Write a mutator method called setRadius for the radius field. Write an accessor method called getRadius for the radius field. Write a method called getArea that returns the area of the circle. Write a method called getDiameter that returns the diameter of the circle Write a method called getCircumference that returns the circumference of the circle. Write a class "CircleDemo" with the main method that demonstrates the Circle class by asking the user for the circle's radius, creating a Circle object, and then reporting the circle's area, diameter, and circumference. Oo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
