Out of the four options, only the whale possesses mammary glands. Mammary glands are a defining characteristic of mammals and are responsible for producing milk to nourish their offspring.
While all four animals are vertebrates, not all vertebrates are mammals. Mammals are a group of animals characterized by the presence of hair or fur, the ability to regulate their body temperature internally, and the presence of mammary glands. Dogs, cats, whales, and sharks are all different types of vertebrates, but only whales are mammals and possess mammary glands.
Dogs, cats, and sharks are all examples of non-mammalian vertebrates. While they may produce some form of nourishment for their young, it is not produced by mammary glands. Catfish, on the other hand, are a type of fish and do not produce milk or any other form of nourishment for their young beyond their initial supply of yolk sac nutrients.