key | An index, of any type, used to look up values in a table. |
keyword | A reserved word that is used by the compiler to parse programs. Examples we have seen include int, void and endl. |
leaf | A bottom-most node in a tree, which refers to no other nodes. |
level | The set of nodes equidistant from the root. |
linear time | An operation whose run time is a linear function of the size of the data structure. |
link | An object reference embedded in an object. |
linked queue | An implementation of a queue using a linked list and references to the first and last nodes. |
list | A data structure that implements a collection using a sequence of linked nodes. |
load factor | The number of entries in a hashtable divided by the number of lists in the hashtable; i.e. the average number of entries per list. |
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 conditions. |
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 is declared within the class defintion of an object. It is invoked directly on an object using dot notation. |
mergesort | An algorithm for sorting a collection of values. Mergesort is faster than the simple algorithm in the previous chapter, especially for large collections. |
method encapsulation | The design goal of keeping the interface of a method separate from the details of its implementation. |
method | A named sequence of statements that performs some useful function. Methods may or may not take parameters, and may or may not produce a result. |
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. |
new | an operator that returns a pointer of the appropriate data type, which points to the reserved place. |
node | An element of a list, usually implemented as an object that contains a reference to another object of the same type. |
nonmember function | A function defined outside any class or structure defintion. Nonmember functions are not invoked on objects and they do not have a current object. Also called a "free-standing" function. |
object | A collection of related data that comes with a set of functions that operate on it. The objects we have used so far are the cout object provided by the system, and pstrings. |
object code | The output of the compiler, after translating the program. |
object encapsulation | The design goal of keeping the implementations of two objects as separate as possible. Neither class should have to know the details of the implementation of the other. |
object method | A method that is invoked on an object, and that operates on that object, which is referred to by the keyword this in Java or "the current object" in English. Object methods do not have the keyword static. |
operand | One of the values on which an operator operates. |
operator | A special symbol that represents a simple computation like addition or multiplication. |
order of growth | A set of functions with the same leading-order term, and therefore the same qualitative behavior for large values of n. |
ordered set | A data structure in which every element appears only once and every element has an index that identifies it. |
overhead | Additional time or resources consumed by a programming performing operations other than the abstract operations considered in performance analysis. |
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. |
package | A collection of classes. The built-in Java classes are organized in packages. |
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. |
parent | The node that refers to a given node. |
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. |
performance hazard | A danger associated with a veneer that some of the methods might be implemented inefficiently in a way that is not apparent to the client. |
pixel | The unit in which coordinates are measured. |
pointer | a variable that holds an address in memory. Similar to a reference, however, pointers have different syntax and traditional uses from references. |
portability | A property of a program that can run on more than one kind of computer. |
postcondition | A predicate that must be true at the end of a method or function (provided that the preconditions were true at the beginning). |
postfix | A way of writing mathematical expressions with the operators after the operands. |
postorder | A way to traverse a tree, visiting the children of each node before the node itself. |
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. |
predicate | A mathematical statement that is either true or false. |
prefix notation | A way of writing a mathematical expression with each operator appearing before its operands. |
preorder | A way to traverse a tree, visiting each node before its children. |
priority queue | A queueing discipline in which each member has a priority determined by external factors. The member with the highest priority is the first to be removed. |
private | A keyword that indicates that a method or instance variable cannot be accessed from outside the current class definition. |
problem-solving | The process of formulating a problem, finding a solution, and expressing the solution. |
project | A collection of one or more class definitions (one per file) that make up a program. |
prototype | A way of describing the interface to a method using Java-like syntax. |
provider | The code that implements an ADT (or the person who wrote it). |
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. |