From 5754ae4ab11c3b5b7fbf4683a84217818b1fccfa Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Tue, 28 Apr 2020 00:40:48 +0300 Subject: Update Farm.hpp --- Polymorphism/Farm(cloneFunction)/Farm.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Polymorphism/Farm(cloneFunction)') 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) -- cgit v1.3.1-23-gd82d