In C++, create a class to act as a generic array (i.e. the user will be able
Question:
In C++, create a class to act as a generic array (i.e. the user will be able to choose the data type to be stored by passing the appropriate template argument. Integer template arguments will also be used to set the upper and lower bounds of the array. Provide all necessary functionality to allow the class to act as an array ([] operator, = operator etc.). The array does not need to provide input or output methods to act on the entire array. Errors within operators and constructors will be handled with exceptions (try, throw, catch). Demonstrate that your array operators work inside a function if the array is passed inby referenceas a “const”. Provide a Copy method to provide the same functionality as the=operator. Also provide GetAt and SetAt methods to provideways of getting and setting values at a particular index in the array.