Question: Write the method average which accepts an int array and returns the average of the values. Use the following initialization statement: int[] array = {1,1,2,3,5,8,13,21,34};

Write the method average which accepts an int array and returns the average of the values. Use the following initialization statement: int[] array = {1,1,2,3,5,8,13,21,34}; Write the method countAboveAve which accepts an int array and returns the number of values that are above the average. You must call average. Write the method largest which accepts an int array and returns the largest value of the array. Write the method indexOfSmallest which accepts an int array and returns the index of the smallest value. If there are multiple smallest values, return the index of the first one. Write the method indexOfLastSmallest which accepts an int array and returns the index of the smallest value. If there are multiple smallest values, return the index of the last one.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!