Inheritance and Composition Chapter 11

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

____ is a "has a" relationship between classes.

Composition

To include a user-defined header file in a program, you enclose the header file between ____.

Double quotation marks

_____ is the ability to combine data and operations on that data in a single unit.

Encapsulation

Derived classes ____.

Inherit the properties of base classes

To avoid multiple inclusions of header files in a program, which of the following preprocessor commands (with the appropriate identifiers and/or statements) should you use?

ifndef, define, endif

The class ofstream is directly derived from the class ____.

ostream

If a derived class overrides a public member function of the base class, you can call the base class function by using the ____.

base class name, followed by the scope resolution operator, followed by the function name and appropriate parameter list.

____ takes place when one or more members of a class are objects of another class type.

Composition

A call to the base class's constructor is specified in the ____.

Heading of the definition of the derived class constructor

In the case of composition, use the ____ name to invoke its own constructor.

Member Object

A common and simple technique to identify classes is to identify all of the nouns and verbs in the description of the problem; ____ represent the classes.

Nouns

In OOD, a program is a collection of interacting ____.

Objects

If the corresponding functions in the base class and the derived class have the same name but different sets of parameters, this is function ____.

Overloading

Which of the following statements is FALSE?

The derived class cannot redefine the public member functions of the base class.

When no member access specifier is included in a derived class header definition, it is assumed to be ____.

A private inheritance

When the destructor of the derived class executes, it automatically invokes the destructor of the _____ class.

Base

In ____ polymorphism, the (data) type is left unspecified and then later instantiated.

Parametric

____ is the ability to use the same expression to denote different operations.

Polymorphism

In ____ inheritance, a derived class is inherited from a single base class.

Single

Inheritance is an example of a(n) ____ relationship.

is-a


संबंधित स्टडी सेट्स

Chem AP Classroom Midterm Review

View Set