Term
When both a base class and a derived class have constructors, the base class’s constructor is called __________ (first/last). |
|
Definition
|
|
Term
An overridden base class function may be called by a function in a derived class by using the __________ operator. |
|
Definition
scope resolution or scope resolution operator |
|
|
Term
A(n) __________ member function in a base class expects to be overridden in a derived class. |
|
Definition
|
|
Term
__________ binding is when a function call is bound at runtime. |
|
Definition
|
|
Term
When a pointer to a base class is made to point to a derived class, the pointer ignores and __________ the derived class functions, unless the function is __________. |
|
Definition
|
|
Term
A(n) __________ function has no body, or definition, in the class in which it is declared. |
|
Definition
|
|
Term
__________ is where a derived class has two or more base classes. |
|
Definition
|
|
Term
(T/F) The base class’s access specification affects the way base class member functions may access base class member variables. |
|
Definition
|
|
Term
(T/F) Private members of a private base class become inaccessible to the derived class. |
|
Definition
|
|
Term
(T/F) Protected members of a private base class become public members of the derived class. |
|
Definition
|
|
Term
(T/F) Private members of a protected base class become inaccessible to the derived class. |
|
Definition
|
|
Term
(T/F) The base class constructor is called after the derived class constructor. |
|
Definition
|
|
Term
(T/F) It isn't possible for a base class to have more than one constructor. |
|
Definition
|
|
Term
(T/F) A member function of a derived class may not have the same name as a member function of the base class. |
|
Definition
|
|
Term
(T/F) A base class may not be derived from another class. |
|
Definition
|
|
Term
If a member variable is declared __________, all objects of that class have access to the same variable. |
|
Definition
|
|
Term
A(n) __________ member function cannot access any nonstatic member variables in its own class. |
|
Definition
|
|
Term
A(n) __________ function is not a member of a class, but has access to the private members of the class. |
|
Definition
|
|
Term
__________ is the default behavior when an object is assigned the value of another object of the same class. |
|
Definition
|
|
Term
__________ is a special built-in pointer that is automatically passed as a hidden argument to all nonstatic member functions. |
|
Definition
|
|
Term
When overloading the __________ operator, its function must have a dummy parameter. |
|
Definition
Any of the following answers are acceptable: postfix -- postfix increment/decrement postfix decrement postfix ++ postfix ++/-- postfix increment |
|
|
Term
Object aggregation is useful for creating a(n) __________ relationship between two classes. |
|
Definition
Any of the following answers are acceptable: whole-part is-a has-a is a has a whole part |
|
|
Term
(T/F) Static member variables cannot be accessed by nonstatic member functions. |
|
Definition
|
|
Term
(T/F) A static member function may refer to nonstatic member variables of the same class, but only after an instance of the class has been defined. |
|
Definition
|
|
Term
(T/F) A friend function has access to the private members of the class declaring it a friend. |
|
Definition
|
|
Term
(T/F) In order for a function or class to become a friend of another class, it must be declared as such by the class granting it access. |
|
Definition
|
|
Term
(T/F) You cannot use the = operator to assign one object’s values to another object, unless you overload the operator. |
|
Definition
|
|
Term
(T/F) If a class has a copy constructor, and an object of that class is passed by value into a function, the function’s parameter will not call its copy constructor. |
|
Definition
|
|
Term
(T/F) All functions that overload unary operators must have a dummy parameter. |
|
Definition
|
|
Term
(T/F) It is possible to have an instance of one class as a member of another class. |
|
Definition
|
|
Term
_________ programming is centered around functions or procedures. |
|
Definition
|
|
Term
_________ is an object’s ability to contain and manipulate its own data. |
|
Definition
|
|
Term
A class is very similar to a(n) _________. |
|
Definition
|
|
Term
The default access specification of class members is _________. |
|
Definition
|
|
Term
Defining a class object is often called the _________ of a class. |
|
Definition
|
|
Term
If you were writing the declaration of a class named Canine, what would you name the file it was stored in? _________ |
|
Definition
|
|
Term
When a member function’s body is written inside a class declaration, the function is _________. |
|
Definition
|
|
Term
A(n) _________ is a member function with the same name as the class. |
|
Definition
|
|
Term
Constructors cannot have a(n) _________ type. |
|
Definition
|
|
Term
A(n) _________ is a member function that is automatically called when an object is destroyed. |
|
Definition
|
|
Term
Like constructors, destructors cannot have a(n) _________ type. |
|
Definition
|
|
Term
A class may have more than one constructor, as long as each has a different _________. |
|
Definition
Any of the following answers are acceptable: signature parameter parameter list |
|
|
Term
A(n) _________ may be used to pass arguments to the constructors of elements in an object array. |
|
Definition
|
|
Term
(T/F) Class members are private by default. |
|
Definition
|
|
Term
(T/F) Classes and structures in C++ are very similar. |
|
Definition
|
|
Term
(T/F) All public members of a class must be declared together. |
|
Definition
|
|
Term
(T/F) You can use the new operator to dynamically allocate an instance of a class. |
|
Definition
|
|
Term
Constructors do not have to have the same name as the class. |
|
Definition
|
|
Term
(T/F) Constructors cannot take arguments. |
|
Definition
|
|
Term
Destructors may return a value. |
|
Definition
|
|
Term
Member functions may be overloaded. |
|
Definition
|
|
Term
A class may not have a constructor with no parameter list, and a constructor whose arguments all have default values. |
|
Definition
|
|
Term
A class’s responsibilities are the things the class is responsible for knowing, and actions the class must perform. |
|
Definition
|
|
Term
When an array of objects is defined, the constructor is only called for the first element. |
|
Definition
|
|
Term
The __________ file stream data type is for output files, input files, or files that perform both input and output. |
|
Definition
|
|
Term
The same formatting techniques used with __________ may also be used when writing data to a file. |
|
Definition
|
|
Term
The __________ member function reads a single character from a file. |
|
Definition
|
|
Term
__________ files contain data that is unformatted and not necessarily stored as ASCII text. |
|
Definition
|
|
Term
The __________ member function writes “raw” binary data to a file. |
|
Definition
|
|
Term
In __________ file access, the contents of a file may be read in any order. |
|
Definition
|
|
Term
The __________ member function moves a file’s write position to a specified byte in the file. |
|
Definition
|
|
Term
The __________ member function returns a file’s current write position. |
|
Definition
|
|
Term
The __________ mode flag causes an offset to be calculated from the end of a file. |
|
Definition
|
|
Term
(T/F) fstream objects are only capable of performing file output operations. |
|
Definition
|
|
Term
(T/F) ifstream objects, by default, create a file if it doesn’t exist when opened. |
|
Definition
|
|
Term
(T/F) A file may be opened in the definition of the file stream object. |
|
Definition
|
|
Term
(T/F) A file stream object’s fail member function may be used to determine if the file was successfully opened. |
|
Definition
|
|
Term
(T/F) The >> operator expects data to be delimited by whitespace characters. |
|
Definition
|
|
Term
(T/F) It is not possible to have more than one file open at once in a program. |
|
Definition
|
|
Term
(T/F) Binary is the default mode in which files are opened. |
|
Definition
|
|
Term
(T/F) It is possible to open a file for both input and output. |
|
Definition
|
|
Term
What data type is used to create a file and then write info to that file, but not to read info from the file? |
|
Definition
|
|
Term
Given a file called info.txt and an a stream object dataFile, what is the statement that will open the file for both input and output? |
|
Definition
dataFile.open("info.txt", ios::in | ios::out); |
|
|
Term
To access files from a C++ program, you must include what directive? |
|
Definition
|
|
Term
All stream objects have these and they indicate the condition of the stream. |
|
Definition
|
|
Term
What is the term that means non-sequentially accessing information in a file? |
|
Definition
|
|
Term
Of all the data types/structures that we have learned, a class is similar to which one? |
|
Definition
|
|
Term
Name the three class access specifiers. |
|
Definition
public, private, and protected |
|
|
Term
What do you call a constructor that accepts no arguments. |
|
Definition
|
|
Term
What do you use to access members of a class object (name, not symbol)? |
|
Definition
|
|
Term
When a member function is defined outside of the class declaration, the function must be qualified with what? |
|
Definition
class name and scope resolution operator |
|
|
Term
Each object of a class gets its own copy of what? |
|
Definition
|
|
Term
What type of data member may be accessed before any objects of the class have been created? |
|
Definition
|
|
Term
What do you have to use to dereference an object pointer? |
|
Definition
|
|
Term
What does C++ require a copy constructor's parameter to be? |
|
Definition
|
|
Term
Given two classes (bClass and dClass), if dClass is to inherit bClass, what is the class header to achieve this? |
|
Definition
class dClass: public bClass |
|
|
Term
What type of function is not a member of the class, but has access to the private members of the class? |
|
Definition
|
|
Term
What concept allows us to create a new class based on an existing class? |
|
Definition
|
|
Term
What type of members of a base class are never accessible to a derived class? |
|
Definition
|
|
Term
When working with base and derived classes: the ______ constructor is called before the _____ constructor. |
|
Definition
|
|
Term
What is the special built in pointer that is available to a class's member functions? |
|
Definition
|
|