COMPUTER SCIENCE INHERITANCE

(iii) Name the data member(s) that can be accessed by an object of bus class.

Ans: No data member can be accessed by an object of bus class.

(iv) Is the member function outputdata accessible to the objects of heavy_vehicle class?

Ans: No.

DELHI 1998:

2.c) Consider the following declarations and answer the questions below:

class PPP
{ int H;
protected:
int S;
public:
void INPUT(int);
void OUT();
};
class QQQ:private PPP
{ int T;
protected:
int U;
public:
void INDATA(int,int);
void OUTPUT();
};
class RRR:public QQQ
{ int M;
public:
void DISP(void);
};

(i) Name the base class and derived class of the class QQQ.

Ans: Base class of QQQ – PPP Derived class of QQQ – RRR

(ii) Name the data member(s) that can be accessed from function DISP().

Ans: QQQ::U , RRR::M

(iii) Name the member function(s) , which can be accessed from the object of class RRR.

Ans:

QQQ::INDATA( )
QQQ::OUTPUT( ) RRR::DISP( )

(iv) Is the member function OUT() accessible by the objects of the class QQQ?

Ans: No.

 

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com )


Warning: include_once(../../ebooks-footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/inheritance11.php on line 119

Warning: include_once(): Failed opening '../../ebooks-footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/inheritance11.php on line 119

Warning: include_once(../../../footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/inheritance11.php on line 121

Warning: include_once(): Failed opening '../../../footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/inheritance11.php on line 121