C++
Question 1
1. All of the items that follow the keyword "private:"
|
|
1. |
cannot be referenced by name anyplace |
|
|
2. |
can only be referenced within the definitions of the member functions |
|
|
3. |
can only be referenced within main |
|
|
4. |
can only be referenced by other objects |
Question 2
1. Once you make a member variable a private member variable, there is no way to change its value
True
False
Question 3
1. Good programming practice require that all member variables be private
True
False
Question 4
1. In C++, API stands for
|
|
1. |
Applied Precision, Inc |
|
|
2. |
Academic Performance Index |
|
|
3. |
application programmer interface |
|
|
4. |
access program index |
Question 5
1. The implementation of a class tells how the class interface is realized as C++ code
True
False
Question 6
1. Getters are functions that:
|
|
|
simply return the value of a private member variable |
|
|
|
simply set the value of a private member variable |
Question 7
1. Setters are functions that:
|
|
|
simply set the value of a private member variable |
|
|
|
simply return the value of a private member variable |
Question 8
1. Constructor is:
Select ALL that apply.
|
|
|
are used to set member variables of the class to a value after the object has been created |
|
|
|
a special kind of class member function that is executed when an object of that class is instantiated |
|
|
|
are typically used to initialize member variables of the class to appropriate default values |
1. Constructors have the following specific rules: Select ALL that apply.
|
|
|
Constructors should not have the same name as the class |
|
|
|
Constructors have void as a return type |
|
|
|
Constructors have no return type (not even void) |
|
|
|
Constructors should always have the same name as the class (with the same capitalization) |