#include <iostream>
using namespace std;
class Point {
public:
Point() : x(0), y(0) {
cout << "Default Constructor called." << endl;
}
Point(int x, int y) : x(x), y(y) {
cout << "Constructor called." << endl;
}
~Point() { cout << "Destructor called." << endl; }
int getX() const { return x; }
int getY() const { return y; }
void move(int newX, int newY) {
x = newX;
y = newY;
}
private:
int x, y;
};
class Polygon {
public:
Polygon(int n);
~Polygon();
private:
Point* p;
int n;
};
Polygon::Polygon(int n)
{
p = new Point[n];
cout << "new!" << endl;
}
Polygon::~Polygon()
{
delete[] p;
cout << "delete!" << endl;
}
int main() {
int n;
cin >> n;
Polygon poly(n);
return 0;
}