Implemented bubbleSort on Poly class.