Below is a class called pointerDataClass that store data in aone-dimensional array using pointer.
#include
using namespace std;
class pointerDataClass
{ int maxSize;//variable to store the maximum size of p
int length;//variable to store the number of elements in p
int *p;// pointer to an int array
public:
//Constructor to create an array of the size specified by theparameter size.
pointerDataClass(int size);
//Destructor to deallocate the memory space occupied by thearray p
~pointerDataClass();
//the function insertAt inserts num into array p at the positionspecified by Â
//index
void insertAt(int index, int num);
//The function displayData displays all the array elements inp
void displayData();
  };
- Implement (write code) all constructors, functions, and thedestructor ~pointerDataClass.  Â
- Write a main function to perform the following:
- Create a pointerDataClass object called list11 with a size of10 elements
- Insert the following numbers into the array p of the objectlist11:
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. - Display the array p of the object list11
PLEASE DO THIS WITH C++
Also, using declaration of array and using [] notationfor accessing element of array