Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 13 / Farm / Farm.h
diff options
context:
space:
mode:
Commitc1a310e69933035fb385f52275e9b80cdad695fc (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2022-05-24 19:38:22 +0300
Committer
 GitHub <noreply@github.com>
2022-05-24 19:38:22 +0300
Files65bf3496cdae1f59e68cc741de5d2b9dfba648d0 /Sem. 13/Farm/Farm.h
Object-oriented_programming_FMI-c1a310e69933035fb385f52275e9b80cdad695fc.tar
Object-oriented_programming_FMI-c1a310e69933035fb385f52275e9b80cdad695fc.tar.gz
Object-oriented_programming_FMI-c1a310e69933035fb385f52275e9b80cdad695fc.zip
Parentc7daf590047fd6f2039fed4f67a643a2178988d1 (diff)
Add files via upload
1 files changed, 24 insertions, 0 deletions
-rw-r--r--Sem. 13/Farm/Farm.h24
diff --git a/Sem. 13/Farm/Farm.h b/Sem. 13/Farm/Farm.h
new file mode 100644
index 0000000..f33f244
--- /dev/null
+++ b/Sem. 13/Farm/Farm.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "Animal.h"
+
+class Farm
+{
+ Animal** animals;
+ size_t animalsCount;
+ size_t capacity;
+
+ void free();
+ void copyFrom(const Farm& other);
+ void resize();
+
+public:
+ Farm();
+ Farm(const Farm& other);
+ Farm& operator=(const Farm& other);
+ ~Farm();
+
+ void addAnimal(const Animal& animal);
+
+ void allSayHello() const;
+
+};