subject

Please HELP QUICK
PUT CODE DOWN BELOW

The Circle and CircleTester have been created, but they have errors. The public and private settings for variables and methods are not all correct.

Your job is to go through and fix them. You will need to make edits in both files to get them working correctly, but once complete, your output should match the output below.

Sample Output: Circle with a radius of 5.0
The diameter is 10.0
The perimeter is 31.41592653589793

CirclwTester, java : public class CircleTester {

public static void main(String[] args) {

Circle circ = new Circle(10);

circ. radius = 5;

System. out. println(circ);

System. out. println("The diameter is " + circ. getDiameter());
System. out. println("The perimeter is " + circ. getPerimeter());

}

}

Circle. java : public class Circle {

public double radius;

private Circle(double myRadius) {
radius = myRadius;
}

private void setRadius(int myRadius){
radius = myRadius;
}

private double getDiameter() {
return radius*2;
}

public double getRadius() {
return radius;
}

private double getPerimeter() {
return Math. PI*getDiameter();
}

private String toString() {
return "Circle with a radius of " + radius;
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:50
15: 28read the summary of "an indian's view of indian affairs."15 betterin "an indian's view of indian affairs," it is asserted that conflicts could be reduced if white americansunderstood native americans..pswhich of the following would make this summary more complete? eleo the fact that chief joseph believes the great spirit sees everythinthe fact that chief joseph was born in oregon and is thirty-eight years oldo the fact that chief joseph states that he speaks from the hearthehehethe fact that chief joseph of the nez percé tribe made this claimebell- ==feetle===-felsefe ==submitmark this and retum.=
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
You know the right answer?
Please HELP QUICK
PUT CODE DOWN BELOW

The Circle and CircleTester have been create...
Questions
question
Chemistry, 19.11.2020 14:20
question
Mathematics, 19.11.2020 14:20
question
Chemistry, 19.11.2020 14:20
question
Computers and Technology, 19.11.2020 14:20
question
Mathematics, 19.11.2020 14:30
Questions on the website: 13722363