Distinguish between virtual functions and pure virtual functions.
What will be an ideal response?
A virtual function must have a definition in the class in which it is declared. A pure virtual function does not provide a definition. A pure virtual function is appropriate when it does not make sense to provide an implementation for a function in a base class (i.e., some additional derived-class-specific data is required to implement the function in a meaningful manner). A class with one or more pure virtual functions is an abstract class—you cannot instantiate objects from an abstract class. Classes derived directly from the abstract class must provide definitions for the inherited pure virtual functions to become a concrete class; otherwise, the derived class becomes an abstract class as well.
You might also like to view...
In the binary search routine in the text, the first thing the code does is to check whether the object is not in the array. What is the test for this condition?
a) first < last b) first == last c) first > last d) the test does not involve the variables first and last.
Which of the following is an example of a mobile device?
A. supercomputers B. installed media modems C. smartphones D. servers
?_____ design and set up databases to meet an organization's needs.
Fill in the blank(s) with the appropriate word(s).
To edit a recorded macro, you use the macro recorder. _________________________
Answer the following statement true (T) or false (F)