In your first lab in IBDP Computer Science, you will explore the relationship between an array and an array list by creating your own array list class. The completion of this lab should give you a stronger understanding of what exactly an array list is and how it is implemented. Because we want our array list to be able to work with any data type, we will explore the use of generics. You have seen and used generics before. When you have created an array list in the past, you specified what type of data was to be stored in the array list in between the <> brackets. Your goal is to implement a class called DynamicArray that will effectively mirror the functionality of the ArrayList class. DynamicArray must pass all of the tests in the provided DynamicArrayTest class. DynamicArray will implement the following methods:
size()
isEmpty()
get(int index)
contains(T element)
add(T element)
add(int index, T element)
set(int index, T element)
remove(int index)
remove(T element)
removeAll(T element)
clear()
Good luck, have fun =)