From 1642c3257456591480c6179e5d4d377741ede6c8 Mon Sep 17 00:00:00 2001 From: Angeld55 Date: Thu, 19 Sep 2019 21:19:44 +0300 Subject: Rename Polymorphism/main.cpp to Polymorphism/Figures/main.cpp --- Polymorphism/Figures/main.cpp | 20 ++++++++++++++++++++ Polymorphism/main.cpp | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 Polymorphism/Figures/main.cpp delete mode 100644 Polymorphism/main.cpp (limited to 'Polymorphism') diff --git a/Polymorphism/Figures/main.cpp b/Polymorphism/Figures/main.cpp new file mode 100644 index 0000000..39336c3 --- /dev/null +++ b/Polymorphism/Figures/main.cpp @@ -0,0 +1,20 @@ +#include "Figure.h" + + +int main() +{ + Figure** arr= new Figure*[3]; + arr[0] = new Triangle(15, 15, 15, 30, 50, 30); + arr[1] = new Rectangle(15, 15, 50, 30); + arr[2] = new Circle(1, 2, 9); + + for (int i = 0; i < 3; i++) + { + cout << arr[i]->getPer()<getArea()<getPer()<getArea()<