MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / Dog

Class Dog

data/cpp/03_classes_oop.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15class Dog : public Animal {
16public:
17 Dog(std::string name, std::string breed)
18 : Animal(std::move(name)), breed_(std::move(breed)) {}
19
20 std::string speak() const override {
21 return name() + " barks!";
22 }
23
24private:
25 std::string breed_;
26};
27
28int main() {
29 Dog dog("Rex", "Shepherd");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected