Write a method that takes an int array and returns the count
of even values in the array.
Write a method that takes an int array and returns the count
of odd values in the array.
Write a method that takes an int array and returns the sum of
the elements of the array.
Write a method that takes an int array and returns the
average of the elements of the array. (Note: if the array is of zero
length this method should return the special double
value NaN which you will get if you divide
a double value by zero.)
Write a method that takes an int array and returns the
average of the even values in the array. (Note: if there are no even
numbers to average this method should return the
special double value NaN which you will get if
you divide a double by zero.)
Write a method that takes an int array and returns the
average of the values at even positions in the array. (Note: if the array
is empty this method should return the special double
value NaN which you will get if you divide
a double by zero.)
Write a method that takes an int limit and
an int array and returns true if any value in
the array is bigger than the limit.
Write a method that takes an int limit and
an int array and returns true if every value in
the array is smaller than the limit.
Write a method that takes an int limit and
an int array and returns the first number in the array that
is bigger than the limit or -1 if no value is.
Write a method that takes an int limit and
an int array and returns the index of the first number in the
array that is bigger than the limit or -1 if no value is.
Similar to the loop idioms test but now using arrays instead of
the Numbers object. summing them up or averaging them, etc.