Chapter 9 Flashcards
built-in type
compilers know how to represent objects of the type and which operations can be done on it without being told by declarations supplied by a programmer in sourse code
class
a user-defined type that spcefies how object of its type are represented, how those objects can be created, how they are used, and how they can be destroyed
const
const value; it’s possible to write static const in classes in order to make one copy og the value in the program rather than one per object
constructor
a member function with the same name as its class that is used for initialization of objects of the class
destructor
a member function which destructs or deletes an object
enum
a keyword for enumeration
enumeration
a user defined type, specifying its set of values as symbolic constants
enumerator
a named constant that is a part of enumeration
helper function
a function (usually supplied by the writer of a class) that does not need direct access to the representation of the class, yet is seen as part of the useful interface to the class
implementation
a part of a class’s declaration that its users can access only indirectly through the interface - class members (private)
in-class initializer
an initializer for a class member specified as part of the member declaration
inlining
a function is inline when it is defined within a class; the compiler will try to generate the to generate code for the function at each point of call rather than using function-call instructions to use common code -> performance advantage for small functions
interface
part of a class’s declaration that its users access directly (public)
invariant
a rule for what constitutes a valid value
representation
a type “knows” how to represent the data needed in an object