Multiple Choice
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
Correct Answer:
Verified
Q3: _ is the ability to use the
Q11: _ is a "has-a" relationship.<br>A) Inheritance<br>B) Encapsulation<br>C)
Q14: In C++,we implement ADT through the use
Q16: Objects are created when _ variables are
Q19: _ is the ability to combine data,
Q29: To _ a public member function of
Q33: In multiple inheritance, the derived class has
Q34: The _ members of an object form
Q37: In _ (aggregation), one or more members
Q40: Which of the following is true about