Answer the questions (i) to (iv) based on the
following code :
class Teacher
{ char TNo[5], TName [20], Dept[10];
int Workload;
protected:
float Salary ;
void AssignSal (float) ;
public:
Teacher ( );
void TEntry ( ) ;
void TDisplay ( ) ;
};
class student
{
char Admno[10], SName [20], Stream [10];
protected:
intAttendance, TotMarks;
public:
Student ( );
void SEntry ( ) ;
void SDisplay ( ) ;
};
class School: public Student, public Teacher
{
char SCode [10], SchName [20] ;
public:
School ();
void SchEntry ( ) ;
void Schfrisplay ( ) ; };
i) Which type of Inheritance is depicted by the above example?
(ii) Identify the member function(s) that cannot be called directly from the objects of class School from the following:
TEntry ()
SDisplay( )
SchEntry( )
(iii) Write name of all the member(s) accessible from member functions of class School.
(iv) If class School was derived privately from class Teacher and privately from class Student; then, name the member function(s) that could be accessed through objects of class school.