15) You want addEm to now add all three values and return the sum and changeEm to change x
and y, but leave z alone. Which should you do?
A) Redefine addEm and changeEm without referencing super.addEm( ) or super.changeEm( )
B) Redefine addEm to return the value of z + super.addEm( ), but leave changeEm alone
C) Redefine changeEm to call super.changeEm( ) and then set z = x + y, but leave addEm alone
D) Redefine addEm to return the value of z + super.addEm( ) and redefine changeEm to call
super.changeEm( ) and then set z = x + y
E) Redefine changeEm to call super.changeEm( ) without doing anything to z, and redefine
addEm to return super.addEm( )
16) Which of the following would best redefine the toString method for BClass?
A) public String toString(int z)
{
return ” ” + x + ” ” + y + ” ” + z;
}
B) public String toString( )
{
return super.toString( );
}
C) public String toString( )
{
return super.toString( ) + ” ” + z;
}
D) public String toString( )
{
return super.toString( ) + ” ” x + ” ” + y + ” ” + z;
}
E) public String toString( )
{
return ” ” + x + ” + y + ” ” + z;
}