Question: 2. (15 marks) Follow the following steps: 1) Write a Java class named circle with integer data member named radius. The class should have two

2. (15 marks) 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
Get step-by-step solutions from verified subject matter experts
