Objects; Functional And Object-Oriented Programming Compared - HP Reliable Transaction Router Getting Started

Reliable transaction router
Table of Contents

Advertisement

Object-Oriented Programming
Table 2–1 Functional and Object-Oriented Programming
Functional Programming
A program consists of data
structures and algorithms.
The basic programming
unit is the function, that
when run, implements an
algorithm.
Functions operate on
elemental data types or
data structures.
An application's architecture
consists of a hierarchy of
functions and sub-functions.
In the object-oriented environment, a program or application

Objects

is a grouping of cooperating objects. The basic programming
unit is the class. Instantiating, or declaring, an instance of,
a class implements an object. RTR provides object-oriented
programming capabilities with the C++ API, described in the HP
Reliable Transaction Router C++ Foundation Classes manual and
the Java API, described in the JRTR Getting Started manual.
Objects are instances of a class. In a transaction class, each
transaction is an object. An object is an instantiated (declared)
class. Its state and behavior are determined by the attributes
and methods defined in the class. An object or class is defined by
its:
The name given at object declaration is its identity. In
Example 2–1, the two dog objects King and Fifi are instances
of Dog. The Dog class is declared in a header (Dog.h) file and
implemented in a .cpp file.
2–8 Architectural Concepts
Compared
State (attributes)
Behavior (methods)
Identity (name at instantiation)
Object-Oriented Programming
A program consists of a team of
cooperating objects.
The basic programming
unit is the class, that when
instantiated, implements an
object.
Objects communicate by sending
messages.
An applications architecture
consists of objects that model
entities of the problem domain.
Objects' relationships can vary.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aa-rle1c-te

Table of Contents