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

Class Animal

data/cpp/03_classes_oop.cpp:4–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <string>
3
4class Animal {
5public:
6 Animal(std::string name) : name_(std::move(name)) {}
7 virtual ~Animal() = default;
8 virtual std::string speak() const = 0;
9 const std::string& name() const { return name_; }
10
11private:
12 std::string name_;
13};
14
15class Dog : public Animal {
16public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected