Observe the following C++ code and answer the questions (i) and (ii). Note: Assume all necessary files are included.
class FIRST
{
int Num1;
public:
void Display () // Member Function1
{
cout<< Num1<<end1;
}
};
class SECOND : public FIRST
{
int Num2;
public:
void Display () //Member Function2
{
cout<<Num2<<end1;
}
};
void main ()
{
SECOND S;
............... //Statement 1
............. //Statement 2
}
(i) Which Object-Oriented Programming feature is illustrated by the definitions of classes FIRST and SECOND?
(ii) Wife Statement 1 and Statement 2 to execute Member Function 1 and Member Function 2 respectively using the object S