private static void choosePivot(Comparable[] theArray, 
                                int first, int last) {
// ---------------------------------------------------------
// Chooses a pivot for quicksort's partition algorithm and 
// swaps it with the first item in an array.
// Precondition: theArray[first..last] is an array; 
// first <= last.
// Postcondition: theArray[first] is the pivot.
// ---------------------------------------------------------
// Implementation left as an exercise.
}  // end choosePivot
