Question: by using JAVA Analyse, compile and fix bugs in the following program class Circle {private double r; public void Circle (double r) {r = r;}

 by using JAVA Analyse, compile and fix bugs in the following

by using JAVA

Analyse, compile and fix bugs in the following program class Circle {private double r; public void Circle (double r) {r = r;} private double calCircumference {} {return 2*Math.FI*r;} public static double calArea {} {return Math.PI* r*r;} class CircleApp {public static void main (String [] args} {double rd = Double.parseDouble (args [0]}; System.out.println ("circle radius = " + rd};//create an object of Circle with the radius rd Circle circle1 = new Circle (rd); double cir = circle1. CalCircumference (); double area = circle1.calArea(); System.out.println ("Circumference = " + cir}; System.out.println ("Area = " + area);}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!