Who were the two captains onboard the titanic?

Haddock was Capt. for a week from March 25th until April 2nd, when Haddock left Southampton on Olympic. Then Edward John Smith became captain.