INHERITANCE IN C++ (6)

Consider the following C++ code and answer the questions (i) to (iv) given below:
class Office
{
ine E;
protected:
inr S, 0;
public:
void INPUT();
void OUTPUT();
};
class Dept:protected Office
{
int A, B;
protected:
void IN(int,int);
public:
void OUT();
};
class Employee:public Dept
{
int X;
void DISPLAY(void);
public:
void ENTER();
};

(i) Name of the base class and derived class of the class Dept.
(ii) Name of the data member(s) that can be accessed from function OUT();
(iii) Name of the private member function(s) of class Employee.
(iv) Which type of inheritance is illustrated in the above code?


No comments

Post your comments

Powered by Blogger.