Question: Please post a copyable version of the code--not a screenshot. Please use Java. Thanks! Use the Circle class (attached with the homework) to create an
Please post a copyable version of the code--not a screenshot. Please use Java. Thanks!
Use the Circle class (attached with the homework) to create an Array of circles. Your program should do the following: a. Ask the user to enter the radius for 5 circles. b. create an Array of circles c. Add java statement(s) to show the size of the Array elements.
Circle Class:
public class Circle { private double radius; public Circle() { } public Circle(double radius) { this.radius = radius; } public void setRadius(double radius) { this.radius = radius; } public double getRadius() { return radius; } public double getArea() { return 3.14 * radius *radius; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
