Thank you all for your advice so far, I have been working on my code on and off for the last week.
I have added another class for getting the mean and standard deviation.
The code so far calculates the mean, it does work more or less. I just want to tidy up how it looks on the output screen,
as for the standard deviation I am planning on working on that in the coming week.
I have adjusted some of the first code.
any further pointers are appreciated.