The story takes place aboard the Royal Navy ship HMS Pinafore. The captain's daughter, Josephine, is in love with a lower-class sailor, Ralph Rackstraw, although her father intends her to marry Sir Joseph Porter, the First Lord of the Admiralty. ... They declare their love for each other and eventually plan to elope.