Solved

Consider the Following Class Definitions:Which of the Following Correctly Sets a a

Question 37

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)  {   \mathrm{x}=\mathrm{a}  ;   y=b ;   } C)  void dClass: setXY (int a, int b)  {   x=   bClass: : set   (a)   ;   y=   bClass: : setY (b) ; } D)  void dClass: setXY (int a, int b)  {   x=   bClass.setx (a) ;   \mathrm{b}=\mathrm{y} ;   }


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

Correct Answer:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents