Exercise 1

1 Using Algorithm Sections

Write a function, mySum, which calculates the sum of numbers, in an array of arbitrary size.




Write a function, a
verage, which calculates the average of numbers, in an array of arbitrary size. The average function should use make a function call to mySum.




Write a class,
LargestAverage, that has two arrays and calculates the average of each of them. Then it compares the averages and sets a variable to true if the first array is larger than the second and otherwise false.



1.1

1.1.1 mySum



1.1.2 average



1.1.3 LargestAverage


1.1.4 Simulation of LargestAverage