The computation of the second-order hydrodynamic forces on a slender ship in waves