Question: inputData.txt file -15 -57 -75 -93 -42 -1 -9 -63 -77 -12 please follow the directions carefully and do as stated, thanks! Problem Statement: The

 inputData.txt file -15 -57 -75 -93 -42 -1 -9 -63 -77-12 please follow the directions carefully and do as stated, thanks! Problem

inputData.txt file

-15 -57 -75 -93 -42 -1 -9 -63 -77 -12

please follow the directions carefully and do as stated, thanks!

Problem Statement: The following method does not appear to be working properly if all data are negative numbers. You are asked to write a test driver class that will test this method in order to identify the issue with the code. The driver class will first read a data (from an input file called "inputData.txt") into an integer array then call the method with different input parameters to test its functionality. Finds the target value in array elements x[start] through x[last]. 2param x array whose largest value is found 2param start first subscript in range Oparam last last subscript in range Creturn the largest value of x[start] through x[last] Opre first last public int findMax(int x, int start, int last) if (start last) throw new IllegalArgumentException ("Empty range"); int maxSoFar 0; for (int i start; i K last; i f if (x[i] maxSoFar maxSoFar i; return maxSoFar

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!