Chapter 14 More About Classes Flashcards
If a member variable is declared ________, all objects of that class have access to the same variable.
Static
Static member variables are defined ________ the class.
Outside
A(n) ________ member function cannot access any nonstatic member variables in its own class.
Static
A static member function may be called _______ any instances of its class are defined.
Before
A(n) ________ function is not a member of the class, but has access to the private members of the class.
Friend
A(n) _______ tells the compiler that a specific class will be declared later in the function.
Forward declaration
________ is the default behavior when an object is assigned the value of another object of the same class.
Memberwise assignment
A(n) ________ is a special constructor, called whenever a new object is initialized with another object’s data.
Copy Constructor
_______ is a special built in pointer that is automatically passed as a hidden argument to all nonstatic member functions.
This
An operator may be _______ to work with a specific class.
Overloaded
When overloading the ________ operator, its function must have a dummy parameter.
Postfix increment (or decrement)
Making an instance of one class a member of another class is called ________.
Aggregation
Object aggregation is useful for creating a(n) ________ relationship between two classes.
Has a
Static variables cannot be accessed by nonstatic member functions. t/f
true
Static member variables are defined outside their class declaration. t/f
true