Computer Science - Chapter 15 (Quiz)

Ace your homework & exams now with Quizwiz!

In an inheritance situation, the new class that you create from an existing class is known as the ________.

derived class and child class

The ________ destructor is called before the ________ destructor.

derived, base

Multiple inheritance is when a ________ class has ________ base classes.

derived, two or more

In the following statement: class Car : protected Vehicle ________ is the derived class.

Car

True/False: A member function of a derived class may not have the same name as a member function of a base class.

False

________ allows us to create new classes based on existing classes.

Inheritance

________ is commonly used to extend a class, or to give it additional capabilities.

Inheritance

When more than one class is derived from a base class, the situation is called:

Not multiplicity; population; polymorphism; or encapsulation

The following statement: class Car : private Vehicle allows the ________ members of the Car class to access ________ members of the Vehicle class.

Not private, private; public, private; public, protected; or protected, private

________ members of a base class are never accessible to a derived class.

Private

True/False: In C++ 11, if a derived class attempts to override a final member function, the compiler generates an error.

True

True/False: Pointers to a base class may be assigned the address of a derived class object.

True

True/False: Static binding occurs when the compiler binds a function call with the function call that resides in the same class as the call itself.

True

True/False: The base class access specification can be viewed as a filter that base class members must pass through when becoming inherited members of a derived class.

True

The base class's ________ affects the way its members are inherited by the derived class.

access specification

The ________ constructor is called before the ________ constructor.

base, derived

When you derive a class from an existing class, you ________ add new data and functions.

may

Polymorphism is when ________ in a class hierarchy perform differently, depending upon which object performs the call.

member functions

A virtual function is a member function that expects to be ________ in a derived class.

overridden

C++ 11 introduces the ________ key word to help prevent subtle errors when overriding virtual functions.

override

The term ________ means the ability to take many forms.

polymorphism

Protected members of a base class are like ________, but they may be accessed by derived classes.

private members

When the compiler binds a member function call with the version of the function that resides in the same class as the call itself, this is considered ________ binding.

static

In the following statement: class car : public vehicle ________ is the base class.

vehicle

A ________ of a base class expects to be overridden in a derived class.

virtual function


Related study sets

Exam 2, NUR 145 Chapter 25 Assessment of Cardiovascular Function NCLEX Questions

View Set

MGMT 300 FINAL, Mgt 330 Final, CHAPTER 17, Management 1310 Ch. 17 (Dickens), test 3

View Set

Tema 6 La época de entreguerras (1919 - 1939)

View Set

Project Risk Management (Chapter 11)

View Set

Chapter 1 and Chapter 3 Microbiology

View Set

Nevada Statutes & Regulations Common to all lines

View Set

LabSim TestOut Linux Pro - Ch. 6

View Set

Healthcare Administration Exam #1

View Set