Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

What information might lead you to choose working for the company?

Answered: 1 week ago

Question

Object - Oriented database query lauguage

Answered: 1 week ago

Question

=+associated with political parties and if so, which ones? Are

Answered: 1 week ago