Looking for Об'єктно-орієнтоване програмування (1 курс КН) test answers and solutions? Browse our comprehensive collection of verified answers for Об'єктно-орієнтоване програмування (1 курс КН) at moodle.chnu.edu.ua.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
(C++)
(C++)
class base
{int x, y;
public: int fun ();
};
class derived: protected base
{int z;
public: int fun1 ();
};
Визначте тип доступу з класу derived до членів x, y, fun класу base .
(C++)
(C++)
class base
{int x, y;
public: int getx () {return x; }
int gety () {return y; }
};
class Derived: private base
{int z;
public: int getz () {return z; }
base :: getx;
} Obj;
Який з наступних операторів призведе до помилок компіляції?
(C++)
class Base {
...
public: void f ();
private: int * baseID;
};
class Derived: public Base {
...
public: void foo ();
private: int derivedID;
};
Derived my1;
int x;
my1.baseID = & x;
(C++)
class A
{public: int a, b;
protected: int func (float d) {};
private: short i; } A1;
class B: public A
{private: int k; } B1;
class C: public B
{protected: int l, m; } C1;
(C++)
class A { };
class B: public А
{ };
(C++)
class A
{public: int a, b;
protected: int z;
private: short i; } A1;
class B: public A
{public: int c, d;
private: int k;} B1;
(C++)
class Base
{
int b;
protected: int c;
public: int d;
};
class Derived: Base
{
friend class Friend;
int e;
};
class Friend
{
Derived derived;
};
(C++)