A10 ‣ Generics

Create a directory in your repository named a10 and include all of the files for this assignment in the a10 directory.

  1. Write a class named AList that implements the following methods from the List interface.  Each method should be implemented so that it satisfies the description provided in the List interface documentation.
  • void add(int index, E element)
  • boolean add(E e)
  • E remove(int index)
  • boolean remove(Object o)
  • E get(int index)
  • void clear()
  • boolean isEmpty()
  • int size()
  • boolean equals(Object o)
  • int hashCode()
  • Iterator<E> iterator()
  1. Write a driver class named Driver that thoroughly tests each method in your AList class.

© 2017 – 2019, Eric. All rights reserved.