Consider the following class definitions:
class bClass
{
public:
void setX(int) ;
void print() const;
private:
int x;
};
Class dClass: public bClass
{
Public:
void setXY(int,int) ;
void print() const;
private:
Int y;
};
Which of the following statements correctly redefines the member function print of bClass?
A) void dClass::print() const
{
dClass:print() ;
cout << " " << y << endl;
}
B) void dClass::print() const
{
cout << x << " " << y << endl;
}
C) void bClass::print() const
{
cout << x << " " << y << endl;
}
D) void dClass::print() const
{
BClass::print() ;
cout << "y = " << y << endl;
}
Correct Answer:
Verified
Q22: The _ members of an object form
Q25: Consider the following class definitions: class bClass
{
Public:
Void
Q26: In _,the derived class is derived from
Q26: Which of the following statements about inheritance
Q27: The preprocessor directive _ is used to
Q30: The constructor of a derived class cannot
Q31: If the corresponding functions in the base
Q33: Which of the following is true about
Q36: C++ provides _ functions as a means
Q39: OOP implements _.
A) UML
B) IPE
C) EIP
D) OOD
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents