MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / who

Method who

Exercises/Modules/Chapter 15/Soln15_04/Animals.cpp:22–25  ·  view source on GitHub ↗

Return string describing the animal

Source from the content-addressed store, hash-verified

20
21// Return string describing the animal
22std::string Animal::who() const
23{
24 return "My name is " + getName() + ". My weight is " + std::to_string(getWeight()) + " lbs.";
25}
26
27void Animal::setWeight(unsigned weight)
28{

Callers 1

showAnimalsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected