Solved

Consider the Following Class Definitions: Which of the Following Correctly

Question 41

Multiple Choice

Consider the following class definitions: Which of the following correctly sets the values of x and y?
Consider the following class definitions: Which of the following correctly sets the values of x and y?   A)  void dClass::setXY(int a, int b)  { bClass::setX(a) ; y = b; } B)  void dClass::setXY(int a, int b)  { x = a; y = b; } C)  void dClass::setXY(int a, int b)  { x = bClass::setX(a) ; y = bClass::setY(b) ; } D)  void dClass::setXY(int a, int b)  { x = bClass.setX(a) ; b = y; }


A) void dClass::setXY(int a, int b)
{
bClass::setX(a) ;
y = b;
}
B) void dClass::setXY(int a, int b)
{
x = a;
y = b;
}
C) void dClass::setXY(int a, int b)
{
x = bClass::setX(a) ;
y = bClass::setY(b) ;
}
D) void dClass::setXY(int a, int b)
{
x = bClass.setX(a) ;
b = y;
}

Correct Answer:

verifed

Verified

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

Related Questions