Website Summary Files Commits Branches @commit @diff @stats
path: root / Polymorphism / Figures / main.cpp
blob: 39336c310a67a9cef7796cc344f80bc8c44d5a92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()<<endl;
		cout << arr[i]->getArea()<<endl;
	}


}