Question: Implement the following dynamic array: Do not alter the class definition in any way. Use the test driver provided. The Program should not crash. The
Implement the following dynamic array:

Do not alter the class definition in any way. Use the test driver provided. The Program should not crash. The test driver should not be altered. Only an implementation file DynamicIntArray.cpp is to be submitted.
TEST DRIVER:



THIS IS EVERYTHING THAT WAS ASKED FOR THIS ASSIGNMENT, NO MORE INFORMATIONS WERE PROVIDED
#pragma once #include Kiostream namespace cs20a t class Dynamic IntArray public Dynamic Int Array(); explicit Dynamic IntArray (int size); Dynamic IntArray(const Dynamic IntArray & d) ~Dynamic IntArray Dynamic IntArray & operator (const Dynamic IntArray rhs bool is Empty() const; int getUsed() const; int getCapacity() const; void add int element void insert (int i, int element int remove (int i); void clear(); int& operator [](int i); friend std ostream operator (std ostream outs const DynamicIntArray& d) friend bool operator (const Dynamic IntArray &d1 Dynamic IntArray &d2 const private: int used, capacity; int* elements; void expandCapacity()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
