Question: 1. Create the generic ArrayList class that implements the List interface (note that List extends Iterable) a. Overload the add method: include another add method
1. Create the generic ArrayList class that implements the List interface (note that List extends Iterable) a. Overload the add method: include another add method that will have one parameter: an element that adds to the end of the list. b. Override the equals method that checks if the ArrayList is equivalent to the given instance. c. Make your ArrayList dynamic: the array should grow if it runs out of space and shrink if it is less than half full. Modify your add and remove methods and include a resize method to support the dynamic structure. Set the default capacity to 4.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
