Given the following class in Java : public class ThreeTenDynArray<T> { //default initial capacity / minimum capacity private static final int MIN_CAPACITY = 2; //underlying array for storage -- you MUST use this for credit! //Do NOT change the name or type private T[] data; private int size = 0; private int capacity = 0; // ADD MORE PRIVATE MEMBERS HERE IF NEEDED! /** * */ @SuppressWarnings("unchecked") public ThreeTenDynArray() { // Constructor // Initial capacity of the storage should be MIN_CAPACITY // Hint: Can't remember how to make an array of generic Ts? It's in the textbook... data = (T[])(new Object[MIN_CAPACITY]); size = 0; capacity = MIN_CAPACITY; } /** * @param initCapacity */ @SuppressWarnings("unchecked") public ThreeTenDynArray(int initCapacity) { // Constructor // Initial capacity of the storage should be initCapacity. // - Throw IllegalArgumentException if initCapacity is smaller than // MIN_CAPACITY 2 // - Use this _exact_ error message for the exception // (quotes are not part of the message): // "Capacity must be at least 2!" if (initCapacity < MIN_CAPACITY) { throw new IllegalArgumentException("Capacity must be at least 2!"); } } /** * @return */ public int size() { // Report the current number of elements // O(1) return size; //default return, remove/change as needed } /** * @return */ public int capacity() { // Report max number of elements of the current storage // (subject to change since this is a _dynamic_ ) // O(1) return capacity; //default return, remove/change as needed } /** * @param index index you're changing * @param value what you're adding * @return the old item at the index */ public T set(int index, T value) { // Replace the item at the given index to be the given value. // Return the old item at that index. // Note: You cannot add new items (i.e. cannot increase size) with this method. // O(1) //return firstIndexOf(value); // - Throw IndexOutOfBoundsException if index is not valid // - Use this code to produce the correct error message for // the exception (do not use a different message): // "Index: " + index + " out of bounds!" if (index < 0 && index >= size) { throw new IndexOutOfBoundsException("Index: " + index + " out of bounds!"); } // - Throw IllegalArgumentException if value is null. // - Use this _exact_ error message for the exception // (quotes are not part of the message): // "Cannot include null values!" if (value==null) { throw new IllegalArgumentException("Cannot include null values!"); } T oldValue = data[index]; data[index] = value; return oldValue; //default return, remove/change as needed } /** * @param index * @return */ public T get(int index) { // Return the item at the given index if (index < 0 && index >= size) { throw new IndexOutOfBoundsException("Index: " + index + " out of bounds!"); } // O(1) // Use the exception (and error message) described in set() // for invalid indicies. return data[index]; //default return, remove/change as needed } /** * @param value */ @SuppressWarn.