Answered You can hire a professional tutor to get the answer.

QUESTION

Find Three Errors public class Circle { private int radius; public void Circle(int r) { SetRadius(r); } public void SetRadius(int r) { radius = r; }

Find Three Errors

public class Circle

{

  private int radius;

  public void Circle(int r)

  {

     SetRadius(r);

  }

  public void SetRadius(int r)

  {

     radius = r;

  }

  public int GetRadius()

  {

     return radius;

  }

 public int GetArea()

  {

     return Math.PI * Math.power(radius, 2);

  }

}

public class Test{

      public static void main(String[]args){

              Circle c1 = new Circle();

              c1. SetRadius(5);

              System.out.println("Radius is: " + radius);

             System.out.println(c1.GetArea());

      }                                          

}

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question