a submarine is a type of ship