Dr. Tonya Pierce's "C++ Glossary"

Throughout this course, we used many different terms. Use this glossary as a reference now and in your future career as a programmer. 

abstract parameter: A set of parameters that act together as a single parameter.

accessor function: A function that provides access (read or write) to a private instance variable.

accumulator: A variable used inside a loop to accumulate a result, often by getting something added or concatenated during each iteration.

algorithm: A general process for solving a category of problems. A set of instructions for solving a class of problems by a mechanical, unintelligent process.

argument: A value that you provide when you call a function. This value must have the same type as the corresponding parameter.

assignment: A statement that assigns a value to a variable.

body: The statements inside the loop.

boolean: A value or variable that can take on one of two states, often called true and false. In C++, boolean values can be stored in a variable type called bool.

bottom-up design: A method of program development that starts by writing small, useful functions and then assembling them into larger solutions. A method of program development that uses pseudocode to sketch solutions to large problems and design the interfaces of helper functions.

bug: An error in a program.

call: Cause a function to be executed.

chaining: A way of joining several conditional statements in sequence.

class: In general use, a class is a user-defined type with member functions. In C++, a class is a structure with private instance variables.

comparison operator: An operator that compares two values and produces a boolean that indicates the relationship between the operands.

compile: To translate a program in a high-level language into a low-level language, all at once, in preparation for later execution.

composition: The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely.

concatenate: To join two operands end-to-end.

conditional: A block of statements that may or may not be executed depending on some condition.

constant reference parameter: A parameter that is passed by reference but that cannot be modified.

constructor: A special function that creates a new object and initializes its instance variables.

counter: A variable used to count something, usually initialized to zero and then incremented.

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.

dead code: Part of a program that can never be executed, often because it appears after a return statement.

debugging: The process of finding and removing any of the three kinds of errors.

declaration: A statement that creates a new variable and determines its type.

decrement: Decrease the value of a variable by one. The decrement operator in C++ is --.

deterministic: A program that does the same thing every time it is run.

development plan: A process for developing a program. This could be, for example, a style of development based on developing code to do simple, specific things, and then encapsulating and generalizing functions.

element: One of the values in a vector. The [] operator selects elements of a vector.

encapsulate: To divide a large complex program into components (like functions) and isolate the components from each other (for example, by using local variables).

encode: To represent one set of values using another set of values, by constructing a mapping between them.

executable: Another name for object code that is ready to be executed.

expression: A combination of variables, operators and values that represents a single result value. Expressions also have types, as determined by their operators and operands.

fill-in function: A function that takes an "empty" object as a parameter and fills it its instance variables instead of generating a return value.

flag: A variable (usually type bool) that records a condition or status information.

Floating-point: A type of variable (or value) that can contain fractions as well as integers. There are a few floating-point types in C++; the one used most often is double.

formal language: Any of the languages people have designed for specific purposes, like representing mathematical ideas or computer programs. All programming languages are formal languages.

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.

function: A named sequence of statements that performs some useful function. Functions may or may not take parameters, and may or may not produce a result.

functional programming style: A style of program design in which the majority of functions are pure.

generalize: To replace something unnecessarily specific (like a constant value) with something appropriately general (like a variable or parameter). Generalization makes code more versatile, more likely to be reused, and sometimes even easier to write.

helper function: Often a small function that does not do anything enormously useful by itself, but which helps another, more useful, function.

high-level language: A programming language like C++ that is designed to be easy for humans to read and write.

histogram: A vector of integers where each integer counts the number of values that fall into a certain range.

implementation: The body of a function, or the details of how a function works.

increment: Increase the value of a variable by one. The increment operator in C++ is ++. In fact, that's why C++ is called C++, because it is meant to be one better than C.

index: A variable or value used to select one of the members of an ordered set, like a character from a string. An integer variable or value used to indicate an element of a vector.

infinite loop: A loop whose condition is always true.

infinite recursion: A function that calls itself recursively without ever reaching the base case. Eventually an infinite recursion will cause a run-time error.

initialization: A statement that declares a new variable and assigns a value to it at the same time.

instance variable: One of the named data items that make up an structure. Each structure has its own copy of the instance variables for its type.

Instance: An example from a category. My cat is an instance of the category "feline things." Every object is an instance of some type.

interface: A description of how a function is used, including the number and types of the parameters and the type of the return value.

interpret: To execute a program in a high-level language by translating it one line at a time.

invariant: A condition, usually pertaining to an object, that should be true at all times in client code, and that should be maintained by all member functions.

invoke: To call a function "on" an object, in order to pass the object as an implicit parameter.

iteration: One pass through (execution of) the body of the loop, including the evaluation of the condition.

keyword: A reserved word that is used by the compiler to parse programs. Examples include intvoid, and endl.

local variable: A variable that is declared inside a function and that exists only within that function. Local variables cannot be accessed from outside their home function, and do not interfere with any other functions.

logical error: An error in a program that makes it do something other than what the programmer intended.

logical operator: An operator that combines boolean values in order to test compound condition.

loop: A statement that executes repeatedly while a condition is true or until some condition is satisfied.

low-level language: A programming language that is designed to be easy for a computer to execute. Also called "machine language" or "assembly language."

member function: A function that operates on an object that is passed as an implicit parameter named this.

mergesort: An algorithm for sorting a collection of values. Mergesort is faster than the simple algorithm, especially for large collections.

modifier: A function that changes one or more of the objects it receives as parameters, and usually returns void.

modulus: An operator that works on integers and yields the remainder when one number is divided by another. In C++ it is denoted with a percent sign (%).

natural language: Any of the languages people speak that have evolved naturally.

nesting: Putting a conditional statement inside one or both branches of another conditional statement.

nonmember function: A function that is not a member of any structure definition. Also called a "free-standing" function.

object code: The output of the compiler, after translating the program.

object: A collection of related data that comes with a set of functions that operate on it. These include the cout object provided by the system, and strings.

operand: One of the values on which an operator operates.

operator: A special symbol that represents a simple computation like addition or multiplication.

ordered set: A data structure in which every element appears only once and every element has an index that identifies it.

overloading: Having more than one function with the same name but different parameters. When you call an overloaded function, C++ knows which version to use by looking at the arguments you provide.

parameter: A piece of information you provide in order to call a function. Parameters are like variables in the sense that they contain values and have types.

parse: To examine a program and analyze the syntactic structure.

pass by reference: A method of parameter-passing in which the parameter is a reference to the argument variable. Changes to the parameter also affect the argument variable.

pass by value: A method of parameter-passing in which the value provided as an argument is copied into the corresponding parameter, but the parameter and the argument occupy distinct locations.

portability: A property of a program that can run on more than one kind of computer.

postcondition: A condition that is true at the end of a function.

precedence: The order in which operations are evaluated.

precondition: A condition that is assumed to be true at the beginning of a function. If the precondition is not true, the function may not work. It is often a good idea for functions to check their preconditions, if possible.

problem-solving: The process of formulating a problem, finding a solution, and expressing the solution.

pseudocode: A way of designing programs by writing rough drafts in a combination of English and C++.

pseudorandom: A sequence of numbers that appear to be random, but which are actually the product of a deterministic computation.

pure function: A function whose result depends only on its parameters, and that has so effects other than returning a value.

recursion: The process of calling the same function you are currently executing.

reference: A value that indicates or refers to a variable or structure. In a state diagram, a reference appears as an arrow.

return type: The type of value a function returns.

return value: The value provided as the result of a function call.

run-time error: An error in a program that makes it fail at run-time.

scaffolding: Code that is used during program development but is not part of the final version.

seed: A value used to initialize a random number sequence. Using the same seed should yield the same sequence of values.

semantics: The meaning of a program.

source code: A program in a high-level language, before being compiled.

statement: A line of code that represents a command or action. These can be, for example, declarations, assignments, or output statements.

stream: A data structure that represents a "flow" or sequence of data items from one place to another. In C++ streams are used for input and output.

structure: A collection of data grouped together and treated as a single object.

syntax error: An error in a program that makes it impossible to parse (and therefore impossible to compile).

syntax: The structure of a program.

tab: A special character, written as \t in C++, that causes the cursor to move to the next tab stop on the current line.

this: A keyword that refers to the current object. This is a pointer.

traverse: To iterate through all the elements of a set performing a similar operation on each.

type: A set of values. These can be, for example, integers (int in C++) and characters (char in C++).

value: A letter, or number, or other thing that can be stored in a variable.

variable: A named storage location for values. All variables have a type, which determines which values it can store.

vector: A named collection of values, where all the values have the same type, and each value is identified by an index.

void: A special return type that indicates a void function; that is, one that does not return a value.

Last modified: Monday, November 6, 2017, 12:49 PM