Do fish and whales have a brain?

Yes. All animals have brains.