Question: In C++ please: In this lab, we will creating a ArrayList class where all elements in the ArrayList must be of the same type. In
In C++ please:
In this lab, we will creating a ArrayList class where all elements in the ArrayList must be of the same type. In every node of the linked list the size of the array it contains must be at least double the size of the previous nodes array.
These LinkedList classes should both be generic classes. and should contain the following methods:
-
Add - Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right .
-
IsEmpty
-
Clear - Removes all elements from the list
-
Contains - Returns true if the element is in the list
-
Get - Returns a value at a specific position in the list
-
ensureCapacity - Increases the capacity of this ArrayList instance, if necessary.
-
Remove - Removes the last item added to the list
-
Size
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
