Which of the following would correctly call the base class (BaseClass) assignment operator from the derived class (DerivedClass) assignment operator?
DerivedClass& DerivedClass::operator =(const DerivedClass& rightSide)
{
//what goes here?
}
a. BaseClass::operator=(rightSide);
b. leftSide=rightSide;
c. rightSide=BaseClass.rightSide;
d. DerivedClass::rightSide=BaseClass::rightSide;
A
a. BaseClass::operator=(rightSide);
You might also like to view...
What is a virtual hard disk?
What will be an ideal response?
A(n) workbook is an electronic grid in which you can perform numeric calculations.
Answer the following statement true (T) or false (F)
Problems: Correcting Code ErrorsThe following samples of code contain errors. Rewrite the incorrect statements to correct all errors. Private Sub btnCalc_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalc.Click' calculates and displays the total amount owed for purchasing hats' user enters number of hats and price per hat' all hats are on sale for 25% off the priceDim dblNumHats As IntegerDim decHatPrice As DecimalDim decDiscount As DoubleDim decTotal As Decimal' assign number of hats and price to variablesInteger.TryPurse(txtNumHats.Text, intNumHats)Decimal.TryParse(txtHatPrice, decHatPrice)' calculate and display the total amount oweddecDiscount = decHatPrice * dblRATEdecTotal = (intNumHats + decHatPrice) - decDiscountTotal.Text = decTotal.ToString(C2)End Sub
What will be an ideal response?
A tool that displays near selected text that contains formatting commands.
What will be an ideal response?