Friday 16 November 2012

Object Oriented Programming in C++

Object Oriented Programming


array : A collection of objects, referred to as elements, all of which are of the same class and are associated with the same identifier. Each element of an array is associated with unique integer-valued subscript/index. Array elements are assigned contiguous memory locations.

class: A collection of objects all of which have the same types of data members, and the same member functions. In C++ a class serves as a template for its objects.

compound statement : A sequence of one or more statements that are syntactically equivalent to a single statement.

constant: A data object whose value cannot change during the execution of a program.
constructor : A member function of an object that is executed whenever that object comes into existence. Often used to initialize an object's data members.

data type : A set of values. Optionally may include the set of operators used for manipulating those values. declaration statement - A statement that is used to specify the attributes (i.e., properties) of an identifier.

destructor : A member function of an object that is executed whenever that object goes out of existence. Usually used to deallocate any dynamically allocated memory associated with that object.

dynamic allocation : A process of obtaining access to additional memory during program execution.

encapsulation : The ability to define objects (and also functions) in such a way that they can be referenced by some statements within a program but not by others. Also referred to as data hiding.

enumerated type : A data type in which each value corresponds to an integer value.

expression : A well-structured (i.e., syntactically correct) sequence of objects and operators that evaluates to a single value. Must include at least one object.

external object : An object that is defined outside of all functions.

friend : A specification in a designated class of a non-member function of that class (a friend function) or of a second class (a friend class) that gives the friend function, or the member functions of the friend class access to all of the members of objects of the designated class.

inheritance : The ability to define a new class in terms of one or more existing classes.
Objects of the new class, referred to as the derived class, includes the same type of data members and the same function members as objects of each of the existing classes, referred to as base classes, as well as members specific to objects of the derived class.

member : A data or function component of an object.

message : A call (i.e., the invoking) of a member function of an object. The name of the message is the same as the associated member function.

method : The specification of a member function, and how (i.e., its definition) it carries out its task.

object : A collection of data (i.e., other objects) and functions used for interfacing with and otherwise manipulating that data. In C++ these data and functions are referred to as member data and member functions, respectively.

operator precedence: A property of an operator that is used to specify its order of evaluation relative to other operators that are included within the same set of parentheses in an expression. Operators with higher precedence are evaluated before those with lower precedence.

parameter : A mechanism that allows a function to exchange data with other parts of a program. In C++ parameters are used for function-to-function communication of data. Zero or more parameters may be associated with a function.

pointer : An object whose value denotes the address in memory of some other object.
polymorphism : The ability to use the same identifier to name two or more functions within the same scope of a program; gives the appearance that a single function exhibits different behavior depending on the nature (i.e., classes/types and number) of its parameters.
prototype A function declaration. In C++ a statement that specifies the name of the function, the type of value, if any, returned by the function, and the number and types of parameters used when invoking the function.

scope A property of an identifier, and thus the associated component of the program denoted by that identifier, indicating which statements within the program can reference that identifier.

statement : In C++, any well-formed expression that is terminated by a semicolon (";").
static allocation : The process of relating objects with memory at compile-time.
storage class Property of an object that determines when the object comes into existence and goes out of existence (i.e., its lifetime), and any default initial value of that object. An object comes into existence when it assigned to a specific memory location, and goes out of existence when that location is disassigned.

template : A general set of code written using class/data type parameters (or surrogates) that can later be substituted with specific classes/data types resulting in an instantiated set of code that can be used in a program.

virtual function : A designation for a function, say fcn(), of a base class having the property that whenever an object of a derived class contains a redefinition (i.e., a function with the same prototype, and thus the same name) of this virtual function, any reference to fcn() of a derived class object through a base class pointer will cause the derived class variant to execute instead of the base class variant.

visibility : The designation of the scope of the members of a class. Can be private (the default), protected or public. The default for classes is private.

No comments:

Post a Comment