Skip to main content
Contents
Dark Mode Prev Up Next Scratch ActiveCode Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 11.11 Glossary
Glossary 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.
Reading Questions Reading Questions
1.
Match each phrase with the corresponding definition by dragging the phrase into the appropriate box.
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.
2.
Match each phrase with the corresponding definition by dragging the phrase into the appropriate box.
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.
3.
Match each phrase with the corresponding definition by dragging the phrase into the appropriate box.
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.
You have attempted
of
activities on this page.