You will then need to create a new empty project with the files BinStoreSearch.html and BinStoreSearch.java . Right click on the files and store them in your folder. (Important note: Make sure when saving BinStoreSearch.html to choose save as "BinStoreSearch.html" with the double quotes.)Then:
Now that your applet runs, you will need to complete the following methods:
public void quicksort(Item []naA, int nLow, int nHigh)
Sorts the array of objects using Quick Sort
public int partition(Item []naA, int nLow, int nHigh)
Helper method for quicksort
public int linearSearch(int catNumToFind)
Searches the array of objects using linear search, returns inventory of item with that catalog number or -1 if no item with that catalog number exists.
public int binarySearch(int catNumToFind)
Searches the array of objects using binary search, returns inventory of item with that catalog number or -1 if no item with that catalog number exists.
public int binarySearch(int catNumToFind,int nLow, int nHigh)
Searches the array of objects using recursive binary search
binarySearch
, one recursive, and the other using a loop.
When you are finished, post your completed applet to your website, and submit the code for the three completed methods to mrsimon@lycos.com: