public final int partitionByPrice(int lb, int  ub)
	{ // for an outline of how this works, see the partition method for name
		Product pivotElement = allProducts[lb];
		int max = logicalSize;
		int left = lb, right = ub;
		Product temp;

		while (left < right)
		{
			while((allProducts[left].productPrice() <= pivotElement.productPrice()) && left+1 < max) {
				left++;
			}
			while((allProducts[right].productPrice() > pivotElement.productPrice()) && right -1 >= 0) {
				right--;
			}
			if (left < right)
			{
				temp        = allProducts[left];
				allProducts[left]  = allProducts[right];
				allProducts[right] = temp;
			}
		}
		for(left = lb; left <= right && left +1 < max; left++) {
			allProducts[left] = allProducts[left +1];
		}
		allProducts[right] = pivotElement;
		return right;
	}