diff options
split in to folders
1 files changed, 12 insertions, 0 deletions
| -rw-r--r-- | Sem. 13/Farm/Animals/Cat.cpp | 12 |
diff --git a/Sem. 13/Farm/Animals/Cat.cpp b/Sem. 13/Farm/Animals/Cat.cpp new file mode 100644 index 0000000..8716d4b --- /dev/null +++ b/Sem. 13/Farm/Animals/Cat.cpp @@ -0,0 +1,12 @@ +#include "Cat.h" + +void Cat::sayHello() const +{ + std::cout << "Hello, I am a Cat!" << std::endl; +} + +Animal* Cat::clone() const +{ + Animal* newObj = new Cat(*this); //copy constr of Mouse + return newObj; +}
\ No newline at end of file |
