Website Summary Files Commits Branches @commit @diff @stats
path: root / Polymorphism / Farm(cloneFunction)
diff options
context:
space:
mode:
Commit5754ae4ab11c3b5b7fbf4683a84217818b1fccfa (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2020-04-28 00:40:48 +0300
Committer
 GitHub <noreply@github.com>
2020-04-28 00:40:48 +0300
Files8a7f318c19fd1d0fcb32c83bc68411ae6e76810c /Polymorphism/Farm(cloneFunction)
Object-oriented_programming_FMI-5754ae4ab11c3b5b7fbf4683a84217818b1fccfa.tar
Object-oriented_programming_FMI-5754ae4ab11c3b5b7fbf4683a84217818b1fccfa.tar.gz
Object-oriented_programming_FMI-5754ae4ab11c3b5b7fbf4683a84217818b1fccfa.zip
Parenta76d846d0a553d37592913200e46934d0e3d555c (diff)
Update Farm.hpp
1 files changed, 5 insertions, 0 deletions
-rw-r--r--Polymorphism/Farm(cloneFunction)/Farm.hpp5
diff --git a/Polymorphism/Farm(cloneFunction)/Farm.hpp b/Polymorphism/Farm(cloneFunction)/Farm.hpp
index 0d9e5e8..1ad3be5 100644
--- a/Polymorphism/Farm(cloneFunction)/Farm.hpp
+++ b/Polymorphism/Farm(cloneFunction)/Farm.hpp
@@ -6,19 +6,24 @@
class Farm
{
Animal** animals;
+
int len;
int count;
+
void Free();
void CopyFrom(const Farm& other);
+
bool AddAnimal(Animal* an);
public:
Farm(int len);
Farm(const Farm& other);
Farm& operator=(const Farm& other);
~Farm();
+
bool AddCat(std::string name);
bool AddDog(std::string name);
bool AddCow(std::string name);
+
void RoarAll();
};
Farm::Farm(int len)