Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 13 / Figures / main.cpp
diff options
context:
space:
mode:
1 files changed, 0 insertions, 36 deletions
-rw-r--r--Sem. 13/Figures/main.cpp36
diff --git a/Sem. 13/Figures/main.cpp b/Sem. 13/Figures/main.cpp
deleted file mode 100644
index 7e9f9ff..0000000
--- a/Sem. 13/Figures/main.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <iostream>
-using namespace std;
-
-#include "Rectangle.h"
-#include "Circle.h"
-#include "Triangle.h"
-
-
-void printAreas(const Shape* const * shapes, size_t shapesCount)
-{
- for (int i = 0; i < shapesCount; i++)
- cout << shapes[i]->getArea() <<endl;
-}
-void printPers(const Shape* const * shapes, size_t shapesCount)
-{
- for (int i = 0; i < shapesCount; i++)
- cout << shapes[i]->getPer() << endl;
-}
-int main()
-{
- Shape** arr = new Shape*[4];
-
- arr[0] = new Rectangle(3, 4, 6, 8);
- arr[1] = new Circle(3, 3, 4);
- arr[2] = new Circle(1, 4, 5);
- arr[3] = new Triangle(1, 1, 2, 2, 3, 3);
-
- printAreas(arr, 4);
- printPers(arr, 4);
-
- for (int i = 0; i < 4; i++)
- delete arr[i];
- delete[] arr;
-
-
-} \ No newline at end of file