import java.util.Iterator; public class AList implements IList, Iterable { private Object[] entries; public AList() { entries = new Object[10]; } /** * appends item to this list * @param item object to be added to this list * @return true if item is added to this list */ public boolean add(T item) { return false; } /** * appends item to this list * @param index The object item is inserted at index. * @param item object to be added to this list * @return true if item is added to this list */ public boolean add(int index, T item) { return false; } /** * This returns a -1 if quarry is not found or the index of * the fist instance of quarry otherwise. * @param quarry object to be added to this list * @return -1 if quarry is not found or the index where * the first instance of quarry is located. */ public int indexOf(T quarry) { return 0; } /** * This removes the first instance of quarry from this * list; if no instance is found, it returns false. * @param quarry object to be removed to this list * @return false if quarry is not found * or the index where * the first instance of quarry is located. */ public boolean remove(T quarry) { return false; } /** * This removes the object found at index index * @param quarry object to be removed to this list * @return false if quarry is not found * or the index where * the first instance of quarry is located. * @throws IndexOutOfBoundsException if an out-of-bounds index is passed */ public T remove(int index) { return null; } /** * This removes all objects equal to quarry from this list. * @param quarry object to be extirpated from this list * @return false if quarry is not found */ public boolean extirpate(T quarry) { return false; } /** * This removes all elements from this list. */ public void clear() { } /** * This computes the size of the list * @return the number of elements in this list */ public int size() { return 0; } /** * This replaces the object at index index with newItem. * @param index the index at which we are performing the replacement * @param newItem the new item we are placing into the list * @return the item being replaced [the evictee] * @throws IndexOutOfBOundException if the index is out of bounds. */ public T set(int index, T newItem) { } /** * This fetches the object at index index. * @param index the index from which we wish to retrieve an element. * @return the element at index in this list. * @throws IndexOutOfBOundException if the index is out of bounds. */ public T get(int index) { return null; } /** * This checks for the presence of quarry in this list. * @param quarry the item we are searching for in this list * @return true if quarry is found in this list */ public boolean contains(T quarry) { return false; } /** * This creates an iterator that walks through this list in index order. * @return iterator for this list. */ public Iterator iterator() { return null; } }