Question: Class is the parent class of ClassB. A method called CalcNumber is implemented differently in the two classes. In ClassA, the method is defined as:
Class is the parent class of ClassB. A method called CalcNumber is implemented differently in the two classes. In ClassA, the method is defined as: Public Overridable Function CalcNumber 0 As Integer Return 2+2 End Function In ClassB, the method is defined as: Public Overrides Function CalcNumber 0 As Integer Return 3+3 End Function What will be displayed in DisplayTextBox by the following code? Dim inst1 As ClassA New ClassB0 Dim inst2 As ClassA New ClassA0 DisplayTextBox.Text- inst1.CalcNumber0 2 + inst2.CalcNumber0 3 30 O 20 O 24 26
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
