MABS Institution
11th Computer Science Weekly Test - 2 ( Inheritance )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Consider the following and answer the questions given below:
class MNC
{
char Cname[25] ; //Company name
protected:
char Hoffice[25]; // Head office
public:
MNC( ) ;
char Country [25];
void EnterData ( ) ;
void DisplayData ( ) ;
};
class Branch: public MNC
}
long NOE [Number of employees
\\country char Ctry [25];
protected:
void Association ( ) ;
public:
Branch ( ) ;
void add ( ) ;
void Show ( ) ;
};
class Outlet: public Branch
char State [25];
public:
Outlet ( ) ;
void Enter ( ) ;
void Output ( ) ;
};
(i) Which class constructor will be called first at the time of decla~ation of an object Outlet?
(ii) How many types of on object belonging to class output require?
(iii) Name the number functional which are accessed from the objects of class Outlet.
(iv) Name the data numerical, which are accessible from the object(s) of class Outlet.