Built a method to get the average of the array
End of class