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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started