11.11. Glossary¶
- member function:
A function that operates on an object that is passed as an implicit parameter named
this
.- nonmember function:
A function that is not a member of any structure definition. Also called a “free-standing” function.
- invoke:
To call a function “on” an object, in order to pass the object as an implicit parameter.
- current object:
The object on which a member function is invoked. Inside the member function, we can refer to the current object implicitly, or by using the keyword
this
.- this:
A keyword that refers to the current object.
this
is a pointer, which makes it difficult to use, since we do not cover pointers in this book.- interface:
A description of how a function is used, including the number and types of the parameters and the type of the return value.
- function declaration:
A statement that declares the interface to a function without providing the body. Declarations of member functions appear inside structure definitions even if the definitions appear outside.
- implementation:
The body of a function, or the details of how a function works.
- constructor:
A special function that initializes the instance variables of a newly-created object.
-
Q-1: Match the vocabulary word with its definition.
Try again!
- member function
- A function that operates on an object that is passed as an implicit parameter named "this".
- nonmember function
- A free-standing function that is not part of any structure definition.
- current object
- The object on which a member function is invoked.
-
Q-2: Match the vocabulary word with its definition.
Try again!
- invoke
- To call a function “on” an object.
- this
- A keyword that refers to the current object.
- interface
- A description of how a function is used.
-
Q-3: Match the vocabulary word with its definition.
Try again!
- function declaration
- A statement that declares the interface to a function without providing the body.
- implementation
- The body of a function, or the details of how a function works.
- constructor
- A special function that initializes the instance variables of a newly-created object.