Inside main.cpp a new object can be created of class arrayManip by the following code:
arrayManip array1;
There are four main methods that can be called on array1 shown below:
array1.findInteger(); array1.modifyInteger(); array1.addInteger(); array1.deleteInteger();
The array can be displayed by calling the following method:
array1.displayTheArray();
***************The following examples show each method working correctly. *********************** The array may also be displayed to show the changes were made.
Exception handling was also built in to some of the functions as the following pictures show. Try and catch were used to ensure that numerical inputs were accepted, while characters and strings would terminate the program.
A function that can modify the value of an integer when called with the index of the integer in the array and return the new value and old value back to the user.
array1.modifyInteger(); // try and except
A function that adds a new integer to the end of the array
array.addInteger(); // try and except





