Solved

Consider the Following Class Definitions: Which of the Following

Question 20

Multiple Choice

Consider the following class definitions: Consider the following class definitions:   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; } 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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions