Create an ArrayInt class to provide safe integer arrays with bounds checking. Overload operator [] to return

Question:

Create an ArrayInt class to provide safe integer arrays with bounds checking. Overload operator [] to return an element if it exists in the array, or throw an exception if it is outofBounds. Add other methods to ArrayInt, such as Resize (), RemoveElement (), and so on. Model the data comprising the array using a dynamically allocated array (that is, using int *contents) so that you can easily handle resizing. The code would begin as follows:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer: