Question: 4. Write a method that returns the index of the smallest element in an array of integers. If the number of such elements is greater

 4. Write a method that returns the index of the smallest

4. Write a method that returns the index of the smallest element in an array of integers. If the number of such elements is greater than 1, return the smallest index. Use the following header: public static int indexOfSmallestElement (double] array) To test this program, please write a working program using a main method that will test on the tollowing 2 arrays [4.5, 9.67,2.34, 9.2, 71.4, 16.54, 1.323, 9.7, 14.72, 98.3, 34.0, 3.75, 2.39, 23.9, 14.5] [6.2, 97.8, 1.45, 6.3, 1.239, 9.67, 1.24, 6.75, 79.3, 24.25, 6.75, 35.99, 1.24, 5.234, 8.2]

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!