CS2 more chapter 15

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The ________ destructor is called before the ________ destructor.

derived, base

Multiple inheritance is when a ________ class has ________ base classes

derived, two or more

The compiler performs ________ on virtual functions

dynamic binding

A derived class may not have any classes derived from it

false

A member function of a derived class may not have the same name as a member function of a base class

false

In an inheritance situation, you may not pass arguments to a base class constructor

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

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

Inheritance

Arguments are passed to the base class destructor function by the ________ class ________ function

None of these

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

Private

functions are dynamically bound by the compiler

Virtual

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

access specification

Multiple inheritance opens the opportunity for a derived class to have ________ members

ambiguous

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

When a derived class has two or more base classes, the situation is known as ________

multiple inheritance

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

none of the above

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

to a base class may be assigned the address of a derived class object

pointers

The term ________ means the ability to take many forms

polymorphism

When member functions behave differently, depending upon which object performed the call, this is an example of

polymorphism

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

private members

The base class access specification determines how ________ members in the base class may be accessed by derived classes

private, public, and protected

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

A derived class may become a base class, if another class is derived from it

true

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

true

More than one class may be derived from a base class

true

Pointers to a base class may be assigned the address of a derived class object

true

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

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

When arguments must be passed to the base class constructor, they are passed from the derived class constructor's header line

true

________ functions are dynamically bound by the compiler

virtual

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

virtual function


Set pelajaran terkait

A-Level Maths (P): Chapter 3 - Equations and Inequalities

View Set

(BUS 150) Chapter 5: Forms of Ownership

View Set

Ch. 5 Ethical Issues in Research and Scholarships

View Set

reading guide 13 ch 16 and 18: emotional and social development in middle and late adulthood

View Set

A&P Unit 5 Test, Chapters 11; 12; 13

View Set

March 17, 2016: Conduction System of the Heart (Chapter 20)

View Set