CS102 Glossary of Terms
For your convenience, this list also includes terms from CS101.
If you think an important term is missing, please let us know.
- abstraction
- a mechanism for hiding detail
-
abstract data type (ADT)
-
an interface and its associated expected behavior,
usually implemented as an object containing
some data (the internal representation) and a set of methods implementing the interface
-
abstraction barrier (or interface)
-
a set of operations (or methods of an object) that is used
to access and/or operate on the internal representation
- accessor
- a method for extracting information from an object
-
activation record
-
holds the information on the call stack
that is needed for one procedure call
- actual parameter
- the values that are passed into a procedure or method
-
adapter
-
a class that implements an interface (usually with empty method bodies)
to allow subclasses of the adapter to be easily created for the purpose
of overiding only some of the methods; often used in to create listeners
as anonymous classes
-
address
-
a location in memory; each data item is stored at a particular
memory address
- algorithm
- the idea of how to carry out a computation, may be
implemented as a procedure
-
anonymous class
-
a local class declared without a name and instantiated immediately;
often used in conjunction with adapters for creating event listeners
-
application programmer interface (API)
-
the public classes, public methods, and public variables of the classes
and interfaces within a package; usually provided to the package user
with some form of external documentation
-
atomic step
-
a computation that should be carried out so that no other thread can
observe the intermediate states of the computation; it appears to execute
as a single step as far as any other thread can tell
- base case
- the simplest case, usually the termination case for a recursive algorithm
- binary search tree
- a data structure with in which every node refers to a
left subtree and a right subtree such that all values in
the left subtree are smaller than the value in the node
and all elements in the
right subtree are greater than (or equal to) the value in
the node. the top node is called the root.
the nodes with no children (left and right subtrees empty)
are called leaves.
- binding
- the relation between a symbol and its value
- black box
- something that can be used without knowing how it works inside
-
builder tool
-
an application that allows a person to visually construct a user interface
from components, and then usually
specify the behavior of the interface through additional programming;
Java's BeanBox is an example of a builder tool
-
call by value
-
a parameter passing mechanism in which the actual values are copied onto
the stack for use by the called procedure
-
call by reference
-
a parameter passing mechanism in which the addresses of
the actual values are copied onto
the stack for use by the called procedure, which may then modify
the original values for use by the calling procedure upon return
-
call stack (or execution stack)
-
the part of memory containing the bindings
of formal parameters to actual values for procedure calls
-
catch
-
a Java keyword that identifies a block of code that should execute if
a (certain type of an) exception is thrown from within the matching
try block
- circular list
- a linked list in which the rear item refers back to
the head item
-
client
-
a running program that connects to a server and
communicates with the server (often through a socket or
through remote procedure call)
-
class
-
a definition of a type of object
- compound data
- a collection of data treated as a single unit; has a constructor, accessors,
and an identifier
-
Component
-
a graphics object in the java.awt package (for example, Button)
- constructor
- a method used to create a new object
-
Container
-
a java.awt Component that can contain other component (for example, Frame)
-
correctness
-
safety plus liveness
- data
- information that is manipulated by a computation
-
data abstraction
-
a method for providing a natural, high-level semantics
for (a collection of) data while supressing the details of the
internal representation
- data flow model
- a model of computation in which each computational component is represented as a box whose
arguments and results may be connected from and to other boxes
-
deadlock
-
a state of a program in which threads cannot make progress because they
cannot gain access to needed resources; can be detected as a directed cycle in
a resource allocation graph
-
demarshal
-
to extract values from a message received over a network (often parameter
values or return values from a remote procedure call)
- encapsulation
- a mechanism for hiding and protecting information
- environment
- a "place" in which expressions are evaluated, usually with an associated
set of bindings
-
event source
-
a component responsible for originating events (for example, a
Button would be the source for an ActionEvent)
-
event listener
-
an object that is "interested" in hearing about the occurrances of
certain events from certain sources; has methods that can be called
to inform it when such events occur so that the listener
can react to the events
-
Exception
-
a java class defining a type of object that can be thrown as
an error condition; implements the
Throwable interface
-
exception
-
an error in a program that occurs at run-time
-
exception handling
-
the way in which a program recovers from error conditions (see also:
Exception, exception, try, catch, throw, and finally)
-
execution stack
-
(see call stack)
- expression tree
- a diagram showing the operators and operands of an expression
-
extends
-
a keyword in Java, used for naming the parent class of a class being
defined, as in
public class Foo extends Bar, which specifies
that Bar is the parent class of Foo. As a result, Foo inherits all
members of Bar, and all Foo instances are also instances of Bar.
-
finally
-
a Java keyword identifying a block of code that should
be executed regardless of whether or not the code in the matching
try block completes successfully; return statements and
exceptions thrown from finally blocks supercede any pending control
transfer
-
first class data type
-
in a programming language, these are the types of data that can
be direcly accessed by the program during execution (in Java,
this includes objects of all classes, including instances
of the class Class, which contain information about each class)
- formal parameter
- the parameters declared for a method or procedure,
into which the actual parameter values will be copied
-
garbage
-
memory that had been allocated but is no longer reachable by a process
-
garbage collection
-
claiming unreachable storage for reuse
-
heap
-
an area of memory from which space for dyanamic structures
is allocated
-
human-computer interface (HCI)
-
the way in which an application program communicates with human users
-
implements
-
a keyword in Java, used for naming a Java interface whose methods are
defined by the class,
as in
public class Foo implements Bar, which specifies
that Foo defines all methods in interface Bar;
as a result, any instance of Foo can be used where something of
type Bar is expected.
-
import
-
a Java keyword that instructs the compiler to look for class definitions in
a given package or under a given class name, as in
import java.awt.*;; allows the programmer to use
short names for classes, such as Color instead of
java.awt.Color
- infix notation
- a notation in which operators appear between the operands, as in
3 + 5
-
inheritance
-
getting functionality from a parent class
-
inner class
-
a class defined within another class (see also: top-level inner class,
member class, local class, and anonymous class)
-
input stream
-
a sequence of data to be consumed by a program
-
instance variables
-
the variables holding the internal representation of an object
-
interface
-
Definition 1: how communication occurs between an object and its
users (see also abstraction barrier);
Definition 2: a Java keyword for a type defined by
a collection of method signatures (names,
return types, and parameter types) without method bodies.
-
internal representation
-
the data representation (stored in the instance variables) of an object
-
internet address
-
the unique "name" of a computer connected to the internet
-
internet protocol (IP)
-
the internet protocol is the standard by which messages are formatted
and routed throughout the internet; it relies on each host on the
internet having a unique internet address
- iteration
- a repeated computation, usually performed on a range of
values or on the elements of a data structure
- linked list
- a data structure consisting of a sequence of values linked together
in memory by a chain of references
-
LayoutManager
-
a type of object used to arrange the Component objects within a
Container in the java.awt
-
liveness
-
the program will eventually provide a result
-
local class
-
a class declared within a method body or within a code block (such as
in a while loop or a in conditional statement); has access to the
variables and methods of the containing object, as well as all the
final local variables
- loop
- a programming language construct that supports iteration
(for example, a while loop)
-
loop invariant
-
a property of, or relationship among, the values of the loop variables such
that the property is true both
initially and after each iteration of the loop; together with the
termination condition, a loop invariant is useful in demonstrating
the correctness of a loop
-
marshal
-
to package up a value for transmission across a network in a message
-
member class
-
a class defined within another class (without the
static
modifier); has access to the other classes, methods, and instance variables
of the class, including the private ones
-
memory
-
a place in the computer where values are stored for later retreival
-
memory allocation
-
reserving some available memory on the heap for use (by an object)
-
message
-
in a distributed application, a message contains information to be
communicated from a given process to one or more other processes
-
message-passing
-
a way of thinking about object-oriented programming in which objects
communicate by sending messages to each other (to invoke methods on them)
-
method
-
an operation that one may invoke on an object
-
multiple inheritance
-
this occurs when a class is a subclass of more than one parent;
members of both parents are inherited
-
mutation
-
the act of changing the values of variables or data structures
-
object
-
an abstraction that encapsulates data and knows how to operate
on the data
-
object registry
-
a server that knows the locations of objects on whom methods can
be invoked remotely
-
operator overloading
-
attaching a new semantics to an operator in a language;
for example, in C++, it is possible to override the '+' operator
to have a different meaning depending on the types of the objects
on the left and right sides of the operator
-
output stream
-
a sequence of data produced by a program
-
overload
-
to overload a name is to
using it for multiple purposes (for example, writing two
methods with the same name, but with different parameter types)
-
override
-
to redefine an inherited method in a subclass; the parent method
may be accessed from the sublass using
super.methodName
- parameter
- the way values are passed to a method or procedure
-
package
-
a collection of related classes and interfaces bundled together
for the purpose of convenience and protection; usually provides an
application programmer interface (API) with public classes and public
methods
-
package access protection
-
the default protection in Java, allowing access to all classes within
the package; sometimes called "friendly" access protection
-
packet
-
the unit of information sent using IP (the internet protocol)
-
parameterized types
-
types that, when declared or instantiated, are provided with additional
type information; Java does not support this. In C++, for example,
one could define a Vector and restrict all elements to be added
to the Vector to be of type T; on declaration, one could specify which
type to use for T
-
parsing
-
reading an input stream (usually a text file) and breaking it up
into its logical elements called tokens
- polymorphism
- treating objects of many types in a uniform way
-
port number
-
a local number used by a server when it creates a socket for
accepting connections from clients; together, the internet address and
port number uniquely identify the socket so that clients can
connect to it
- predicate
- an expression that evaluates to either true or false
- prefix notation
- a notation in which operators appear before the operands, as in
add(3,5)
- primitive data
- data, such as numbers and symbols, that are built into the language
-
private
-
a Java access protection modifier, allowing access from only this class
(and any inner classes within the class or its containing class)
- procedure
- a description of an activity to be carried out (by a computer)
- process
- an activity (carried out by a computer)
- programming language
- a language used to write a procedure or other description of
a computation
-
protected
-
a Java access protection modifier, allowing access from this class,
from any class in the package, and from subclass of this class
-
protocol
-
the agreed-upon structure of communication between two or more parties;
for example, a message-passing protocol would include the types of
the messages, what they contain,
and how each party is expected to respond to each message
-
public
-
a Java access protection modifier, allowing access from any class
- queue
- a data structure with first-in first-out behavior, supporting
the operations enqueue (to insert) and dequeue (to remove)
- reduction
- a recasting of one problem as another (somewhat different) problem
- recursion
- a reduction of a problem to another (typically smaller) instance of the same problem
-
reflection
-
Java's term for discovering type information at run-time
-
remote procedure call (RPC)
-
the act of having an executing program on one machine invoke a procedure
that executes on another machine (if parameters are sent, they must be
marshaled and sent, and then demarshaled at the receiving side where the
procedure is executed; return values are handled similarly)
-
remote method invocation (RMI)
-
Java's built-in form of remote procedure call
-
representation invariant
-
a property that holds true of the internal representation initially
and after the completion of each method
-
resource allocation graph
-
a graph whose vertices are threads and resources, with directed edges from
each resource to any thread holding a lock on the resource and directed
edges from each thread to any resource for which it is waiting for a lock;
a directed cycle in the graph indicates deadlock
-
resume
-
the method that makes a thread continue executing from the point where
it was suspended
-
Runnable
-
an interface containing the method
public void run()
for the creation of threads
- semantics
- the meaning of an expression
-
server
-
a (usually continuously running) program that accepts connections
from clients and communicates with them, or executes remote
procedure calls on their behalf
-
socket
-
an abstraction provided on top of TCP/IP for communication
between two processes, a socket provides both an input stream
and an output stream at both ends of the connection
- stack
- a data structure with last-in first-out behavior, supporting
the operations push (to insert) and pop (to remove)
-
start
-
the method that makes a thread begin executing
-
state
-
stored information (associated with a process)
-
stop
-
the method that terminates execution of a thread
- subclass
- a class that extends another class, possibly by adding
new methods or overriding existing methods
- substitution model
- a model of computation in which expressions are successively replaced by their
values until a final result is reached
-
suspend
-
the method that makes a thread pause during its execution
-
synchronized
-
a Java keyword indicating that a lock should be obtained on the object
before the instance method can be executed; no other thread can gain
access to the object through a synchronized method while the lock is held
-
synchronization
-
controlling the interleaving of the execution of different threads
- symbol
- a name used to denote a value
- syntax
- the notation used to express an idea
- tail recursion
- a form of recursion in which the result of the recursive call is the final answer;
no combining is done on the result of the recursive call
-
termination condition
-
a predicate that becomes true when a computation ends
- top-down refinement
- a design technique in which a problem is described at a highly abstract level and then
broken down into finer and finer details until all the pieces are filled in
-
Thread
-
a Java class that defines objects that can be run as threads;
implements
Runnable
-
thread
-
one execution path through a program; multi-threaded applications have
multiple such execution paths running concurrently within the same
address space
-
thread-safe object
-
an object whose representation invariants will continue to hold even if
its methods are called by multiple concurrent threads
-
throw
-
the mechanism for raising an exception when an error condition occurs;
the exception propagates outward from the block of code throwing the
exception and then up the call stack until it is caught (or reaches
the top of the stack, where it is caught by the run-time system)
-
top-level inner class
-
a class defined within another class using the
static modifier;
it is treated by Java as a class that stands on its own, but its name is
prefixed by the name of the containing class and a dot, as in
LinkedList.ListItem
-
transmission control protocol (TCP)
-
a protocol that provides a reliable in-order stream abstraction for
communication between two processes across a network;
usually implemented on top of IP
-
try
-
a Java keyword identifying a block of code that may result in an
exception; usually paired with a
catch clause