Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / Farm / Animals / Cat.cpp
diff options
context:
space:
mode:
Commitf9cb26728021bf85a61f263fdb711c093a7f749a (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2022-05-31 20:21:57 +0300
Committer
 angeld55 <angel_dimitriev@abv.bg>
2022-05-31 20:21:57 +0300
Files655fae8997b597c040d0dde06598a6414f64c21e /Sem. 14/Farm/Animals/Cat.cpp
Object-oriented_programming_FMI-f9cb26728021bf85a61f263fdb711c093a7f749a.tar
Object-oriented_programming_FMI-f9cb26728021bf85a61f263fdb711c093a7f749a.tar.gz
Object-oriented_programming_FMI-f9cb26728021bf85a61f263fdb711c093a7f749a.zip
Parente012bcac0a5c5fc804fbeadb0e8ab382c5e6feb7 (diff)
Sem 14
1 files changed, 12 insertions, 0 deletions
-rw-r--r--Sem. 14/Farm/Animals/Cat.cpp12
diff --git a/Sem. 14/Farm/Animals/Cat.cpp b/Sem. 14/Farm/Animals/Cat.cpp
new file mode 100644
index 0000000..8716d4b
--- /dev/null
+++ b/Sem. 14/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