You are given the following JavaDoc and asked to write the test cases for this method. You do not need to write the java code (JUnit); instead, you need to fill in the table with the inputs you choose...



You are given the following JavaDoc and asked to write the test cases for this method.You do not need to write the java code (JUnit); instead,you need to fill in the table with the inputs you choose for testing and justify your selection. You need to write onlyseven different/distinct test cases and explain why you have chosen the inputs for these cases.



Note that no redundant or duplicate test cases are acceptable.





















Table for JUnit test Cases<br>Expected<br>Output<br>Description and Justification<br>for the JUnit Test<br>a fromlndex tolndex key<br>

Extracted text: Table for JUnit test Cases Expected Output Description and Justification for the JUnit Test a fromlndex tolndex key
You are given the following JavaDoc and asked to write the test cases for this method. You do not<br>need to write the java code (JUnit); instead, you need to fill in the table with the inputs you<br>choose for testing and justify your selection. You need to write only seven different/distinct<br>test cases and explain why you have chosen the inputs for these cases.<br>Note that no redundant or duplicate test cases are acceptable.<br>Searches a range of the specified array of longs for the specified value using the binary search<br>algorithm. The range must be sorted before making this call. If it is not sorted, the results are<br>undefined. If the range contains multiple elements with the specified value, there is no<br>guarantee which one will be found.<br>Parameters:<br>a - the array to be searched<br>fromIndex - the index of the first element (inclusive) to be searched<br>toIndex - the index of the last element (exclusive) to be searched<br>key - the value to be searched for<br>Returns:<br>Index of the search key, if it is contained in the array within the specified range;<br>otherwise, (- (insertion point) - 1). The insertion point is defined as the point at<br>which the key would be inserted into the array: the index of the first element in the<br>range greater than the key, or toIndex if all elements in the range are less than the<br>specified key. Note that this guarantees that the return value will be >= 0 if and only if<br>the key is found.<br>Throws:<br>IllegalArgumentException - if fromIndex > toIndex<br>ArrayIndexOutOfBoundsException - if fromIndex < 0 or toIndex > a.length<br>

Extracted text: You are given the following JavaDoc and asked to write the test cases for this method. You do not need to write the java code (JUnit); instead, you need to fill in the table with the inputs you choose for testing and justify your selection. You need to write only seven different/distinct test cases and explain why you have chosen the inputs for these cases. Note that no redundant or duplicate test cases are acceptable. Searches a range of the specified array of longs for the specified value using the binary search algorithm. The range must be sorted before making this call. If it is not sorted, the results are undefined. If the range contains multiple elements with the specified value, there is no guarantee which one will be found. Parameters: a - the array to be searched fromIndex - the index of the first element (inclusive) to be searched toIndex - the index of the last element (exclusive) to be searched key - the value to be searched for Returns: Index of the search key, if it is contained in the array within the specified range; otherwise, (- (insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the array: the index of the first element in the range greater than the key, or toIndex if all elements in the range are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found. Throws: IllegalArgumentException - if fromIndex > toIndex ArrayIndexOutOfBoundsException - if fromIndex < 0="" or="" toindex=""> a.length
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here