I keep getting this error message
Assignment1.java:17: error: ';' expected int Rectangle box= new Rectangle(); ^Assignment1.java:28: error: ';' expected int Circle circleObject = new Circle(); ^
on my code. Im including the entire code for all 3 classes. (1&2) as picture
5 public class Circle { 6 7 private double diameter; 8 9 // Accessor/getter method for diameter10 public double getDiameter()11 {12 return this.diameter;13 }1415 // Mutator/setter method for diameter16 public void setDiameter(double diameter)17 {18 this.diameter = diameter;19 }2021 // Method for calculating the area of the circle22 public double getArea()23 {24 return Math.PI * Math.pow((diameter/2.0), 2.0);25 }2627 // Method for calculating the circumference of the circle28 public double getCircumference()29 {30 return Math.PI *2*(diameter/2.0);31 }32 }
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here