Question: ) Follow the following steps: 1) Write a Java class named Circle with integer data member named radius. The class should have two constructors, get/set

) Follow the following steps:

1) Write a Java class named Circle with integer data member named radius. The class should have two constructors, get/set methods, a getArea method, and a toString method;

2) In the test driver class, create a LinkedList object called circleList which can hold Circle objects;

3) Write a method called fillList which has a parameter list for receiving the above circleList and a desired size (e.g. 5). In this method, use a loop to create the desired number of Circle objects with random integer radius value in the range of 1 to 10. Each time a new Circle object is created, it is added to the end of CircleList;

4) Write a method called displayTotalArea which receives the circleList through a parameter. This method steps through the circleList, finds the total area of all Circle objects in it and displays the total area;

5) Test your code and take screenshots. Submit your output screenshots and Java code.

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!