Question: #ifndef DYNAMICARRAY _ H #define DYNAMICARRAY _ H #include using namespace std; class DynamicArray { string * array; int currentMaxNumElements; int currentNumElementsStored; void resize (

#ifndef DYNAMICARRAY_H
#define DYNAMICARRAY_H
#include
using namespace std;
class DynamicArray{
string* array;
int currentMaxNumElements;
int currentNumElementsStored;
void resize(const int newsize);
public:
DynamicArray();
DynamicArray(string*, int, int);
DynamicArray(const DynamicArray& rhs);
~DynamicArray() ;
DynamicArray& operator=(const DynamicArray& rhs);
int getCurrentNumElementsStored() const;
int getCurrentMaxNumElements() const;
void addElementToEndOfArr(const string& newitem);
string getElementAtIndex(const int i)const;
void replaceElementAtIndex(int i, string newItem);
void removeElementAtIndex(int i);
void clearArray();
friend ofstream& operator<<(ofstream& out, DynamicArray arr);
};
#include "dynamicArray.cpp"
#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!