ch14

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

It is a good idea to make a copy constructor's parameters ________ by specifying the ________ key word in the parameter list.

constant, const

This is a special function that is called whenever a new object is created and initialized with another object's data.

copy constructor

When objects contain pointers, it is a good idea to create an explicit ________ function.

copy constructor

If you do not furnish one of these a default will be provided for you by the compiler.

copy constructor, constructor, destructor

When you redefine the way a standard operator works when it is used with class objects, you have ________ the operator.

overloaded

A member function that is declared ________ may not access any non-static data members in the class.

static

This type of member variable may be accessed before any objects of the class have been created.

static

This operator may be used to assign one object to another.

=

This is a special built-in pointer that is available to a class's member functions.

this pointer

A good reason for overloading an operator is to enable it to ________.

work in its usual way, but with programmer-defined data types

If a member variable is declared ________, all objects of that class have access to that variable.

Static

In the following function header: FeetInches FeetInches::operator++(int) the word (int) is known as a(n):

dummy parameter

A(n) ________ informs the compiler that a class will be declared later in the program.

forward declaration

This type of function is not a member of a class, but it has access to the private members of the class.

friend

Object composition is useful for creating this type of relationship between classes.

has a

Each object of a class has its own copy of the class's ________.

member variables

When a class contains an instance of another class, it is known as ________.

object composition

When you overload an operator, you cannot change the number of ________ taken by the operator.

operands

To overload the + operator, you would write a function named ________.

operator +

An ________ operator can work with programmer-defined data types.

overloaded

If you do not furnish one of these, an automatic memberwise copy will be performed when one object is assigned to another object.

overloaded assignment operator

C++ requires that a copy constructor's parameter be a(n) ________.

reference object

A reason to overload the ________ is to write classes that have array-like behaviors.

square [ ] brackets

C++ allows you to redefine the way ________ work when used with class objects.

standard operators


Set pelajaran terkait

RN Mental Health Online Practice 2023A

View Set

AP Stats Chapter 3 Quantitative Number Analysis

View Set

Social Psychology - Chapter 4. [Who am I?]

View Set

OB - mental health and substance abuse

View Set

CNA 150 Cisco II - Modules 8 & 9

View Set

Geology 101 Midterm 2, Geology 101, Midterm 2. Skinner 2016

View Set

Chapter 11: Communicating with a purpose

View Set

Introduction to Machine Learning Lesson 9: Semi-Supervised Learning Lesson 9 Quiz

View Set