Welcome to Westonci.ca, your ultimate destination for finding answers to a wide range of questions from experts. Join our Q&A platform and get accurate answers to all your questions from professionals across multiple disciplines. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

Create a class named TestCircle whose main() method declares Several Circle objects. Using the setRadius() method, assign one Circle a small radius value, and assign another a larger value. Do not assign a value to the radius of the third circle; instead, retain the value assigned at construction. Display all the values for all the Circle objects. Save the application as TestCircle.java

Sagot :

Answer:ublic class Circle {

public int radius = 1;

public double diameter;

public double area;

//Constructor for circle class

public double Circle(int First){

return radius;

}

//Start set and get for radius

private double setRadius(int r){

   return radius = 5;

}

private double getRadius(){

 return radius;

}

//Start set and get for diameter

public double setDiamter(double d){

   return diameter = 7;

}

public double getDiamter(){

 return radius * diameter;

}