Author_Institution :
Georgia Inst. of Technol., Atlanta, GA, USA
Abstract :
The new thing in the computer programming arena is object-oriented programming (OOP). OOP distinguishes itself from conventional programming in three important ways: encapsulation, inheritance and polymorphism. Encapsulation describes the organization of both code and data into powerful units called objects. This organization, a natural extension of a data-structure, creates an implicit relationship between object-code and object-data. Encapsulation describes the organization of objects into an object hierarchy. A child-object is said to inherit and specialize the behavior of one or more parent-objects. Polymorphism describes the ability of an object to react to a command with a reaction consistent with the object. There are many methods of effecting encapsulation, inheritance, and polymorphism. Several object-oriented programming languages (OOPLs) have been developed including Smalltalk, Turbo Pascal with Objects, and C++ (pronounced C plus plus). C++ is a popular OOPL among electrical engineers. This popularity is due in part to a strong similarity to ANSI-C. The similarity allows an engineer to first use C++ as a "better C" by learning encapsulation techniques. This first step, encapsulation using C++, is the topic of the present article. Using C++ as a "better C," however, should not be the ultimate goal. The full power of C++ can only be realized by mastering all the underlying OOP mechanisms.<>
Keywords :
C language; data encapsulation; electronic engineering computing; integration; object-oriented programming; C++; child-object; electrical engineers; encapsulation; inheritance; object hierarchy; object-code; object-data; object-oriented programming; object-oriented programming languages; parent-objects; polymorphism; Circuits; Concrete; Control systems; Differential equations; History; Integral equations; Maintenance; Polynomials; Rotating machines; Testing;