How can a programmer optimize the use of pointers to access the same virtual function used in several child classes?

A. A while loop is executed calling each child pointer.
B. The pointers are held in an array and a for loop is used.
C. An if statement can determine the best object.
D. A switch statement can be nested in a while loop, accessing the pointers.


B

Computer Science & Information Technology

You might also like to view...

Private fields of a base class can be accessed in a derived class

a. by calling Private methods declared in the base class b. by calling Public or Protected methods declared in the base class c. directly d. All of the above

Computer Science & Information Technology

Before you can work in a new document in Office 365 Web Apps, you must first download it

Indicate whether the statement is true or false

Computer Science & Information Technology

What important feature does the View tab include?

A) Footer icon B) Header icon C) Draft icon D) Table icon

Computer Science & Information Technology

The ____________________ statement restores an allocated block of storage back to the free storage area (the heap) while a program is running.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology