Answer the following statements true (T) or false (F)
1. To call the base-class default constructor explicitly, the call to a base-class constructor must be
the first statement in the derived-class-constructor definition.
2. When you call an Overridable base class method on a derived class object, the base class
version of the method executes. This is the basis of polymorphism.
3. When a program creates a derived-class object, the Object constructor is the last constructor
called and the first whose body finishes executing.
4. When a base class method is overridden in a derived class, it is common to have the derived
class version call the base class version and then do some additional work.
5. A base class’s method that’s overridden in a derived class will be executed implicitly when the derived class’s method is called.
1. True.
2. False. When you call an Overridable base class method on a derived class object, the derived class version of the method executes. This is the basis of polymorphism.
3. True.
4. True.
5. False. Only constructors are executed implicitly in this fashion; a base-class method can be executed explicitly by using the MyBase keyword.
You might also like to view...
The operation for adding an item to a queue is called
A) requeue B) enqueue C) dequeue D) proqueue
To access the Report Wizard, first click the ____ tab.
A. HOME B. CREATE C. EXTERNAL DATA D. DATABASE TOOLS
In the accompanying figure, the cell with the "Lunch" contents is an example of the use of a ____ attribute.
A. rowspan B. colspan C. merge D. spanrow
Snort works in one of three modes. Which of the following is not one of these modes?
a. Sniffer b. Analyzer c. Packet logger d. Network intrusion-detection