Задача 1. Какъв е резултатът от изпълнението на програмата? #include
<iostream.h>class
Point {public:Point(float=0.0, float=0.0);~Point();protected:float x, y;};Point::Point(float
a, float b) {x = a; y = b;
cout << "Конструктор на Point: " <<
'[' << x << ", " << y << ']' << endl;
}Point::~Point() {
cout << "Деструктор на Point: " <<
'[' << x << ", " << y << ']' << endl;
}class
Circle:public Point {public:Circle(float r=0.0, float x=0.0, float y=0.0);~Circle();private:float radius;};Circle::Circle(float
r, float a, float b):Point(a, b) {radius = r;cout << " Конструктор на Circle:
" << radius << '[' << a << ", " <<
b << ']'<< endl;}Circle::~Circle
() {cout << "Деструктор на Circle:
" << radius << '[' << x << ", " <<
y << ']'<< endl;}void
main() {{Point p(1.1, 2.2);}Circle circle1(4.5, 7.2, 2.9);Circle circle2(10, 5, 5);}Задача #include <iostream.h>class base{public: )
(this!=&x) b = x.b + 1;
};class der1 : public base{public: {if (this!=&x)
};class der2 : public base{public:der2(int x = 2) : base(x+3)
{d = x;
der2(const der2& p){d = p.d + 2;} };class der3 : public der2{public: {d = p.d+3;
{cout << "der3: "
<< d << endl;
}
};void main(){der1 d11(2), d12=d11; der3 d31(3), d32=d31;
cout << "d11: ";
d11.Print();
cout << "d12: ";
d12.Print();
d12 = d11; cout <<
"d12: "; d12.Print();
cout << "d21: ";
d21.Print();
cout << "d22: ";
d22.Print();
d22 = d21; cout <<
"d22: "; d22.Print();
cout << "d31: ";
d31.Print();
cout << "d32: ";
d32.Print();
d32 = d31; cout << "d32:
"; d32.Print();
}