Question: JAVA The following code has 10 unique errors. For all 10 errors below, type the line that contains the error, state what the error is
JAVA

The following code has 10 unique errors. For all 10 errors below, type the line that contains the error, state what the error is and explain how to fix it. Assume each class is in it's own file. There are 5 errors in each class. 2 4 5 6 1 public class circle private double radius; 3 private double PI = 3.14; public circle radius - 1 7 } public circle(double r){ r = radius; } public double getArea(){ PI*radius*radius; 1 public void toString(){ return "Radius: " + radius; } 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 public class Disk inherits Circle public double height; public Disk(double r, double h) { height - 1; super(r); 1 public Disk(double r, double h){ super(r); height - h; } public void setHeight(double h) { height = h; } public double getHeight(){ return height; } 43 44 45 46 47 48 49 50 public double getvolume(){ return getArea()*height; } public String toString(){ return super.tostring() + "Disk has a thickness of + height; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
