Question: O Create the method initArray It is a void method that takes one parameter aln, a double array. For each entry, initArray() will assign to

 O Create the method "initArray" It is a void method that

O Create the method "initArray" It is a void method that takes one parameter "aln, a double array. For each entry, initArray() will assign to it a random number between 0 and 1000, (0..1000). That is, inclusive of o, but not inclusive of 1000 O 1 . O . Create the method statsArray" It is a method that takes one parameter aln, a double array, and returns "aOut, a double array. The method does the following: It creates the array aOut with length 3. It iterates over aln[] to find the minimum, maximum, and average of the values in aln[] It stores the minimum value found in aln[] into aOut[0] It stores the maxium value found in aln[] into aOut[1] It stores the average of the values in aln[] into aOut[2] It returns a Out 1 1 1 . Create the method "findArray" It is a method that takes the following three double parameters: aln(), start, stop. And returns an integer. The method does the following: It iterates over array aln[], counting the number of entries whose value is in the range of values between start and stop, inclusive ... [start .. stop). It returns the sum of the number of values found in that range. O In the main() method: Create the double array rA and allocate to it an array of size 100. Call initArray(ra) Call statsArray(ra) Print out the min, max, and average found by statsArray(). Call findArray(rA, 0, 1000) and prints the result. Call findArray(ra, 0, 500) and prints the result

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!