Java
Define a class named ShapeList ShapeList must extend ArrayList<Shape> ShapeList must have a method with signature: ShapeList largestShapes() The largestShapes method must return a ShapeList that contains all Shapes with the largest area ShapeList must have a method with signature: boolean hasDistinctAreas() The hasDistinctAreas method returns true means that: for all Shape A and Shape B in the ShapeList, if A and B have the same area, then A.equals(B) is true in other words, it returns true if distinct shapes have distinct areas My code is below. What wrong with this? Can someone help me import java.util.ArrayList; public class ShapeList extends ArrayList<Shape> { public void largestShapes(){ int resultList[] = new int[this.size()]; int largestArea =0; for (int i=0; i< this.size(); i++){ if (computeArea(this[i])) > largestArea){ largestArea = computeArea(this[i]); } return resultList[]; } } public boolean hasDistinctAreas(){