Suppose class Child is derived from class Parent that was in turn derived from class GrandParent. This question concerns order of calls to constructors and destructors for these three classes. Declare an object of class Child. We know that Child, Parent and GrandParent constructors are called. In what order are these constructors are called? When the time comes to destroy the class Child object, we know that Child, Parent and GrandParent destructors are called. In what order are these destructor called?
What will be an ideal response?
The constructors are called starting with the constructor for the ultimate base class, class GrandParent, then the first derived class, class Parent, then the object’s class, class Child. At destruction of the Child object, destructors are called in reverse order of their invocation.
You might also like to view...
The item numbered 1 in the accompanying figure is known as the ____.
A. mini calendar B. Calendar folder C. Navigation Pane D. Calendars list
A parameter query displays a dialog box that prompts the user to enter one or more values when the query is run. ____________________
Answer the following statement true (T) or false (F)
Answer the following statement(s) true (T) or false (F)
When using IPv6, two or more nodes on the same link are said to be neighbors.
COGNITIVE ASSESSMENT If you sweep your thumb on the mouse to scroll pages, you likely are using what type of mouse?
A. touch B. optical C. laser D. input