Which of the following is true? Before you answer, define smaller in this context.

a. When class D is derived from class B, the base class is usually smaller.
b. A subclass is usually smaller than the superclass.
c. A parent class is usually larger than a child class.
d. A class that inherits is usually larger than the class from which it inherits.


Smaller means has fewer member functions and/or member variables. Part a) and d) are correct.
Explanation: Parts b), c) are backwards. Part a) uses the language of the text, and is correct. Part d) is consistent with the text’s usage but doesn't say, “derived” and “base” class. In part b), a subclass is the derived class; a superclass is the base class. The base class is smaller. In part c), the child class is the derived class and the parent class is the base class. The base class is smaller, meaning has fewer members. Note that if ‘smaller” means has fewer objects of the class type, then the answers reverse.

Computer Science & Information Technology

You might also like to view...

To change to the completed application’s directory, we opened a command window and used the ________ command to change to the directory (also called a folder) for the Painter application.

a. chge b. cdir c. cd d. changeDirectory

Computer Science & Information Technology

A ____ cell occupies more than one row or column in a table.

A. breadth B. full C. spanning D. columnar

Computer Science & Information Technology

Although a process’s virtual address space is composed of individual pages, the kernel uses a higher-level mechanism, called ________, to organize the virtual memory a process is using.

a) page global directories b) segments c) virtual memory areas d) none of the above

Computer Science & Information Technology

In a ________ graphic you can include text and pictures and you can apply colors, effects, and styles that coordinate with the presentation theme

A) TextArt B) FontArt C) SmartArt D) WordArt

Computer Science & Information Technology