Question: /** * * * OrderedIntList for JUnit test problem * */ package cse360hw7; public class OrderedIntList { private int[] list; private int count; /** *

/** * * * OrderedIntList for JUnit test problem * */ package cse360hw7; public class OrderedIntList { private int[] list; private int count; /** * Default constructor for a size of 10 */ OrderedIntList () { list = new int[10]; count = 0; } /** * Constructor to create an array of size specified * * @param newsize specified size of new array */ OrderedIntList (int newsize) { list = new int[newsize]; count = 0; } /** * size * * return the current size of the array, not the number of elements * * @return length */ public int size () { return list.length; } // search for an item using the binary search algorithm private int search (int target, int low, int high) { if (low > high) return -1; else { int mid = (low + high) / 2; if (list[mid] == target) return mid; else if (list[mid] pos; index--) list[index] = list[index - 1]; list[pos] = val; count++; } } // create a new array with the smaller size private void copyArray (int newsize) { int [] temp = new int [newsize]; for (int index = 0; index 0) { str = "" + list[0]; for (int index = 1; index l. Create a package in eclipse with the name cse360hw7. Copy the OrderedIntListjava file into this package. 2. Generate the initial set of JUnit test cases. All should have the default of fail. 3. Complete the code for your test cases. Create new methods as needed for the tests. Your tests should not have any if statements, loops or output. Use asserts to check the results. 4. Thoroughly test the code. Consider the following tests for insert. This is a minimum of 6 different tests. Each tests should be in its own method. a. insert into an empty list b. insert at beginning, at end and in middle c. insert duplicates d. insert causing array expansion 5. Make sure that all the code meets all coding and documentation standards. The junit test cases should include internal documentation while the orderedIntListjava file contain both internal and external documentation. 6. Submit the following file for grading OrderedIntListTestjava Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
