Write a static method findFigure(picture,threshold), where picture is a twodimensional array of double values. The method should

Question:

Write a static method findFigure(picture,threshold), where picture is a twodimensional array of double values. The method should return a new two-dimensional array whose elements are either 0.0 or 1.0. Each 1.0 in this new array indicates that the corresponding value in picture exceeds threshold times the average of all values in picture. Other elements in the new array are 0.0. For example, if the values in picture are 

1.2 1.3 4.5 6.2 2.7 1.7 3.3 4.4 10.5 17.0 1.1 4.5 2.1 25.3 9.2 1.0 9.5 8.3 2.9 2.1


the average value is 5.55. The resulting array for a threshold of 1.4 would be


and the resulting array for a threshold of 0.6 would be

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: