heap sort class with public and private methods