Question: Java Help: Area of a rectangle = length*width Area of a circle = PI * radius 2 Write a tester class which -creates an ArrayList

Java Help:

Area of a rectangle = length*width

Area of a circle = PI * radius2

Write a tester class which

-creates an ArrayList of type Shapes and populate it with Rectangle and Circle instances,

-Includes a method with the following signature which uses the compareShapes method to calculate the largest shape based on area in the collection. public static Shapes largestShape(List list)

- and displays the largest shape in the collection.

Note: all the shapes classes are written

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!