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...
List five standards that can aid in evaluating user interfaces.
What will be an ideal response?
The ____ point is used by Flash to orient the object every time you transform or animate it.
A. transformation B. axis C. animation D. registration
If a Web site stores no persistent data about a visit to a Web site, it is said to be ____________________.
Fill in the blank(s) with the appropriate word(s).
In the object-oriented database model, this term is the equivalent to a field in a relational model.
A. method B. entity C. class D. attribute