C - Program - 2e - Glossary.pdf
(
72 KB
)
Pobierz
Glossary
access specifier
Dictates the accessibility of class members to the world. Access
specifiers are private, protected, and public.
address operator:
&
When used with a variable name, the address operator
returns the hex address of the memory location for that variable, for example:
&number;
algorithm
A process or set of rules for solving a problem.
ANSI/ISO Standard
American National Standards Institute/International
Standards Organization. Oversees the committee that standardizes the C++
language.
arguments
Input or return values for a function.
array
A list of variables of the same data type that are referenced with a single
name. Each element or member of an array is accessed by using an integer
index value. The
[]
operators are used in the declaration statement. For
example, an array of 100 doubles named “numbers” is declared by using:
doublenumber[100];
array dimension
The size of the array. Arrays can be single-dimensional (list),
two-dimensional, (table), or multi-dimensioned.
array index
The integer value that references a specific element or member of
an array.
array pointers
When an array is declared, C++ automatically creates a pointer
of the same name that “points to” the first element of the array.
ASCII
American Standard Code for Information Interchange (ASCII). The
personal computer uses the ASCII notation for interpreting bits.
associativity
When two (or more) operators that have the same procedure are
found in a C++ expression, associativity specifies the order of operations,
such as left to right or right to left.
automatic variable
Variables that are declared inside functions. Automatic vari-
ables are also known as local variables.
base access specifier
The three access specifiers, private, protected, and public,
can also be used in the first line of a class declaration. When used here, the
specifiers dictate how the base class members are treated in the derived
classes.
615
616
❚
Glossary
base class
A general-purpose class—also known as the “parent” class. New classes
are derived from the base class. These new classes (children classes) are special
cases of the base class. This principle is known as inheritance. For example, a
vehicle class (which describes data and functions for motor vehicles) can be a
base class. A Recreational Vehicle class can be derived from the Vehicle class.
An RV is a Vehicle. The RV inherits properties from the Vehicle class.
base 16
Uses sixteen different symbols to represent a quantity of items. The six-
teen symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F; this is also known as
hexadecimal notation.
base 10
Our common counting system, with ten different symbols to represent a
quantity of items. The ten symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; this is also
known as decimal notation.
base 2
Uses two different symbols to represent a quantity of items. The two
(most common) symbols are 0 and 1; This is also known as binary notation.
binary operator
An operator that requires two operands, such as the addition
operator
a + b
or greater than operator
a > b
bit
A unit of data that exists in one of two states, such as 1 or 0, on or off.
block scope
Variables declared within a set of
{}
are in scope as long as the pro-
gram execution is within the
{}
.
body of function
The statements of C++ code inside a function.
bool
A data type used to declare boolean variables. A boolean variable contains
the value true or false.
breakpoint
A line of source code that is identified by the programmer while he
or she is using the debugger. A breakpoint tells the debugger to stop the pro-
gram on that line of code to enable the programmer to examine program
variables.
byte
Consists of 8 bits and is the basic unit of computer memory.
bytecode
The Java compiler produces bytecode. The Java Virtual Machine pro-
gram interprets the bytecode and issues machine instructions.
call-by-reference
A term used when the address of a variable is passed to a
function.
call-by-reference with pointers
A term used when the address of a variable is
passed into a pointer variable in the function. The address operator is
required in the call statement and the indirection operator is required in the
function.
call-by-reference with reference parameters
The address of a variable is passed
to a reference variable in the function. Just the name of the variable is
required in the call statement and no indirection operator is required in the
function.
call-by-value
The value of a variable is passed to a function.
called function
When one function uses (or invokes) a second function, the sec-
ond function is the called function.
calling function
When one function uses (or invokes) a second function, the first
function is the calling function.
617
❚
Glossary
call statement
The line of code in the program where a function is invoked.
case sensitive
Recognizing upper- and lowercase letters to be different. C++ is a
case-sensitive language. TOTAL, Total, and total are three different names in
C++.
casting
An operation in which the value of one type of data is transformed into
another type of data.
C++ class
The fundamental unit in object-oriented programming; contains the
“job description” (member data and functions) for a program object.
char
A data type used to declare a variable that contains one character symbol.
The value ‘y’ can be stored in a char variable.
character string
A character array, such as char name[50];
child class
A derived class.
See
derived class
and
base class.
class
A “job description” for a program object. The class contains member data
and functions.
See
C++ class.
class constructor
A function that has the same name as the class and is automat-
ically called when objects are declared. The main job of a constructor func-
tion is to initialize object member data. It may be overloaded.
class declaration
The source code that contains the class members, including the
private, protected, and public sections with data and functions. Typically, the
class declaration is contained in a .h file.
class definition
The source code that contains the implementation of member
functions. Typically, the class definition is contained in a .cpp file.
class members
Either data or functions that are declared within a class.
class relationships
The interactions and connections or associations that
classes have with each other. There are three class relationships: uses a, has
a, and is a.
comment
Lines in source code, ignored by the compiler, in which programmers
may write information concerning the file or program.
commercial off-the-shelf (COTS) software
The general term for products
offered by software developers. COTS is ready to use in the developer’s own
software;—for example, COTS software can be file translators, image pro-
cessing, or graphics software.
compiler
A software program that reads source code and produces object or
machine code.
compile-time polymorphism
Illustrated in either overloaded functions or over-
loaded operators. (
See
polymorphism for complete discussion.)
complex class
A class provided in the C++ language for working with complex
numbers. (Complex numbers are represented as
*
*
a + bi,
where i is the
)
conditional statement
A statement in C++ in which a condition is evaluated.
The result determines which path the program control takes.
const
A modifier specifying that the variable is to remain a constant value, such
as const double pi = 3.14159265;
sqrt(-1).
618
❚
Glossary
constructor function
See
class constructor.
data structure
A grouping of data variables that represents a logical unit, such
as the data describing an item in a grocery store, including name, brand, price,
UPC code, etc. The keyword
struct
is required.
data type
A type of “container” holding program data. There are several differ-
ent data types in C++, including
int
,
float
,
double
,
char
, and
bool
.
debugger
The portion of the development environment that allows the pro-
grammer to step into a program and run the program line by line. The pro-
grammer can set breakpoints and watch how the values of variables change.
It is possible to watch the order of statement execution in the debugger.
default input parameter list function
Default input values may be supplied in
the function prototype. If the variables (or values) are not provided in the
function call, the default input values are used in the function.
delimiter
A character specified in a read statement; the reading is concluded
when the delimiter character is found.
derived class
A new class created by inheriting data and functions from a base
or parent class.
See
base class.
destructor function
A function that has the same name as the class with a
such as or The destructor is called automatically
when the object goes out of scope. It cannot be overloaded.
double
A data type used to declare variables with up to ten places of decimal
precision. The value 3.9342431337 can be stored in a double variable.
dynamic memory allocation
Occurs when the program obtains memory for pro-
gram variables “on the fly” as the program executes.
EBCDIC
Extended Binary Coded Decimal Interchange Code. Mainframes and
some minicomputers use the EBCDIC format for interpreting bits.
elements
Members of an array.
enumerated data type
A user-defined type; a numbered list of categories or
items, such as days of the week, types of coins, or dog breeds.
error code
A set of values specified by the programmer that represents errors
discovered in the program. For example, error codes could be 1 for invalid
user input, 2 for file not found, etc.
error flag
The variable containing the error code.
error trap
Term used by programmers that means “be on the look-out” for a
possible error, such as an invalid user input or a divide by zero. Error trap-
ping code checks and avoids invalid code operation.
exception handling
A way to deal with run-time errors gracefully. When an
error occurs, an exception is “thrown” and “caught” by an exception handler.
An exception is another name for an error.
extract
When characters are pulled out of the stream of data, and placed into
variables, these characters are said to be extracted from the stream.
flags
Variables used in programs to remember items or conditions in a program.
Flags are usually integers or boolean variables. For example, set a
'
character,
'
Date
'
Player.
flag = 0
if
no errors occurred or
flag = 1
if an error occurred.
619
❚
Glossary
float
A data type used to declare variables with up to five places of decimal pre-
cision. The value 6.24313 can be stored in a floating point variable.
free
The C standard library function that releases (frees) allocated memory
from the program and returns it to the system.
function
A discrete module or unit of code that performs specific tasks.
function body
Consists of the statements of C++ code inside a function.
function header line
The first line of any function in C/C++ contains the input
types and arguments and return type.
function prototype
The C++ statement that contains the function name, input,
and return data types. The prototype informs the compiler that the function
exists in the program.
GCC GNU C compiler
A C++ development environment produced by the
GNU project.
global variable
A variable declared outside any function. All functions within
the file can access global variables.
has a relationship
The “has a” relationship is a class relationship in which one
object (first) contains another object (second), and the second object is an
integral part of the first object. If the second object were removed from the
first object, the first object could not perform as expected. For example, a ten-
nis player has a tennis racquet.
heap
The portion of the computer memory in which global and static program
variables are stored, along with the memory reserved during dynamic mem-
ory allocation (using the new operator).
hex address
The address of a memory location.
hexadecimal notation
The mathematical notation that describes how computer
memory is referenced. Base 16 is hexadecimal notation.
identifier
In C++, the name of a variable, label, function, or object that the pro-
grammer defines.
indirection operator
*
When used with a pointer, it directs the program to go to
the address held in the pointer variable. The
->
is also an indirection operator
used with a pointer to a struct or a class.
inheritance
The inheritance process in an object-oriented language is demon-
strated when a new class is created from an existing class—and this new class
contains data and functions from the existing class.
See
base class.
inline functions
Inline functions contain the inline keyword in the prototype.
When the executable file is produced, the inline function body is embedded
in the code at the function call location.
input arguments
The variable values (or addresses) passed into a function.
instance of a class (or instantiation of a class)
When a class variable is declared,
an object is created. This object is known as an instance of a class.
int
A data type used to declare variables that are whole numbers. The value of
42 can be contained in an integer variable.
is a relationship
The “is a” relationship is found when one class is derived from
a second class (inheritance-type class relationship). The second class becomes
Plik z chomika:
Januszek66
Inne pliki z tego folderu:
Back Seat_ A Mumbai Tale - Aditya Kripalani.mobi
(755 KB)
Brief Wondrous Life of Oscar Wao, The - Junot Diaz.opf
(3 KB)
Don't Make Me Think, Revisited_ - Steve Krug.mobi
(9256 KB)
M. T. Anderson - Norumbegan 03 - The Empire of Gut and Bone # (v5.0).epub
(2209 KB)
M. T. Anderson - Norumbegan 02 - The Suburb Beyond the Stars # (v5.0).epub
(2105 KB)
Inne foldery tego chomika:
Dokumenty
Galeria
LUDLUM ROBERT
Midi - Kar
Mszał Rzymski PL
Zgłoś jeśli
naruszono regulamin