What OOP stands for
What is Object-Oriented-Programming?
A user-defined data type
What is a class?
This part of a class consists of all member functions that a user may want to apply to their objects
What is a Public Interface?
A variable declared inside the class
What is a data member?
A set of default information for a variable of a class.
What is a constructor?
The technique of hiding the data and functions that operate on class members.
What is encapsulation?
When the member function should not change the object, you would use this keyword
What is const?
T/F
Data members can be public
FALSE
Data members should NEVER BE PUBLIC
This type of notation is used to call member functions
What is dot notation?
This has the same name as the class it is a part of
What is the name of a constructor?
"Accelerate" could be this in a "car" class
What is a member function?
What is used for an object to stores its state
What is a data member?
Protects the data members and encapsulates them.
An operator used for implementing a member function outside the class.
What is the :: operator?
T/F
A class can have multiple constructors
TRUE
A class can have multiple constructors!
As a project gets larger, the functions are harder to maintain.
What is the reason for creating OOP?
Write the first line of class definition for a "dog" class.
What is...
class dog{
This part of a class consists of all member functions that a user may want to apply to their objects
Give an example of an "iphone" variable within the "phone" class calling an "open_app" member function
What is...
iphone.open_app()
T/F
Constructors are void functions because they don't return anything.
FALSE
Although constructors don't return anything, they are NOT void functions!
EXACTLY how an object is implemented
Trick question; we don't need to know exactly how it is implemented
When we specify the member functions, we specify this part of the object
What is the behavior?
These are the only things that can access data members, since they are declared in the private section.
What are member functions?
These are nicknames to easily remember the mutators and accessors
What are "setters" and "getters"?
T/F
Some constructors should have parameters
TRUE
While not ALL constructors need parameters, SOME should have them!