-2-
2. What is the scope of base class members inherited in derived class in the
following code : 4
class base
{
int i, j;
public:
void set (int a, int b);
void show( );
};
class derived : public base
{ int Ki;
public:
derived( int x );
------------
------------
------------
};
& state in how many types we can inherits properties of base class in Derived
class?
3. Write a program for following hierarchy inheritance in the given Figure
below. Assume suitable member function. 4
Staff
Code
Teacher Officer
Subject Grade
Customer
Name, Phone
Depositor
Acc_no, Balance
Borrower
Loan, loan_amount
-3-