Question: Method name: positiveAverage Parameter ( s ) : an int array Return value: the average of the positive items in the array as a double
Method name: positiveAverage
Parameters: an int array
Return value: the average of the positive items in the array as a double value
Example: positiveAveragenew int should return
Note : A positive integer is greater than zero.
Note : You may assume that the array contains at least one positive integer, which avoids the need to check for a dividebyzero error.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
