public class Square extends Shape{ double height; public…
Question public class Square extends Shape{ double height; public… Image transcription textCS 2003 Fundamentals of Algorithmsand Computer ApplicationsImplementing the SortedL… Show more… Show moreImage transcription text5 public class TestSortedList { 6 8 * Sample tests. 19 10 * / 11 privatestatic final PrintStream OUT = System. out; 12 130 public static voidmain (String args) { 14 // Main function to test SortedList… Show more… Show moreImage transcription textpublic interfaceSortedListInterfacetrue if this list has no elements; * false otherwise. */ public boolean isEmpty(); /** * Returns the number of elements in this list. * @return the number of elements in this list. */ public int size(); /** Removes all of the elements from this list. */ public void removeAll(); /** * Returns the element at the specified position in this list. * @param index index of element to return. * @return the element at the specified position in this list. * @throws IndexOutOfBoundsException – if index is out of range * (index < 1 || index > size()). */ public E get(int index) throws ListIndexOutOfBoundsException;} // end BasicListInterface//new class, one that needs changedimport java.util.ArrayList;public class SortedList


