Description
Question 1 (20 points):
Purpose: Practising Java Syntax and Programming
Degree of Diculty: Easy.
(a) (5 points) Implement a Java class called ArrayAverager that uses a method named average to return
the average value of an array of type double, as done in this python snippet:
✞ ☎
def Average ( S ):
total = 0
for x in S :
total = total + X
average = total /len ( S)
return average
✝ ✆
On moodle you will nd a starter le titled ArrayAverager.java with the main method already implemented. Your task is to complete the TODO’s in this le. Once these are correctly implemented your
program should display a value of 3.25 to the console.