Write a C++ function that computes the average value of an array of floating point data, (double *a, int size) in the function use a pointer variable not an integer index, to traverse the array element.
You must write the program that tests the function
You must comment your code including comments at the beginning of each function, that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code complies, runs and provide accurate results.