INHERITANCE IN C++ (2)

Consider the following class declaration and answer the questions given below:

class A
{
Protected:
int y;
private:
void processed();
public:
void getVal(int);
void despVal();
};
class B
{
int X;
protected:
int Z;
public:
void getdata(int,int);
void showData();
};
class C:public A, private B
{
int data;
public:
void dispValue();
};

(i) Name of the member function(s) inherited by class C.
(ii) Name the base class and sub class of class B.
(iii) which type of inheritance out of the following is illustrated in the above example?
I. Multi level Inheritance.
II. Multiple Inheritance.
III. Single Level Inheritance.
(iv) Write the access scope for all members of class B.





No comments

Post your comments

Powered by Blogger.