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
Get step-by-step solutions from verified subject matter experts
