A class includes Data ________ and Member ________.
Members and Functions
Why should an accessor function often be marked as const?
Because you dont want to modify the variable
Data members are ______ that hold data within a class
Variables
True or False: member functions are implemented inside the main() function
False
What is a constructor used for?
Initializes the data members of an object
What does every class begin with?
class
Which function is declared in the public section and allows reading the value of a private member?
Accessor function
Can data members be used outside the class? Why or why not?
No, they can not because they are private
If a class name is Person, and it has a member function displayInfo, the correct function header should be...
void Person::displayInfo
What does the constructor name have to be the same as?
The class name
True or False? You can name a class any name you prefer.
True
A function that does not modify any member variables should be marked as
const
Can you initialize a private data member outside the class definition?
No
Where should member functions be implemented?
Outside the class definition
Are constructors declared inside or outside of the class?
Inside
A class is a _______________ for creating objects.
Blueprint
A _____ function allows changing the value of a private data member.
Mutator
How can data members be accessed?
Using dot notation
Which operator is used to implement a member function outside the class?
::
What does a default constructor consist of?
No arguments/parameters
What is always at the end of every class, indicating the end of the class?
;
What is the purpose of a public interface in a class?
Encapsulation
Where are data members declared (Private or Public)?
In private
When defining an _____ member function, use “const” following the parameter’s parenthesis:
Accessor
Do constructors have a return type (including void)?
No!!!