HardwareStore Sort and Search Program
Description
This program uses the selection sort, quick sort, and sequential search algorithms to conduct sorting and searching on an array of Inventory objects.Associated Concepts:
Selection Sort, Quick Sort, and Sequential Search on an array of objects.
Algorithm:
main method:
The method definitions are the same as the integer versions except that the objects' individual fields are used in the data comparison.
Case 5: call searchByName() method to search an inventory's name
using sequential search algorithm.
Case 6: call selectionSortByID() method to sort the array of inventory objects by ID.
Case 7: call selectionSortByName() method to sort the array of inventory objects by name.
Case 8: call quickSortByID() method to sort the array of inventory objects by ID.
Case 6: call selectionSortByID() method to sort the array of inventory objects by ID.
Case 7: call selectionSortByName() method to sort the array of inventory objects by name.
Case 8: call quickSortByID() method to sort the array of inventory objects by ID.
The method definitions are the same as the integer versions except that the objects' individual fields are used in the data comparison.