Logo Data Structures and Algorithms with Object-Oriented Design Patterns in C++
next up previous contents index

Objects and Classes

``An object  is a region of storage[12].'' The type of the object determines how that region of storage is interpreted and how it can be manipulated. C++ provides built-in types , such as char, int and float, and it supports the creation of user-defined types using the class construct.

The class construct is what makes C++ an object-oriented language. A C++ class definition groups a set of values with a set of operations. Classes facilitate modularity and information hiding. The user of a class manipulates object instances of that class only through a well-defined interface.

It is often the case that different classes possess common features. Different classes may share common values; they may perform the same operations; they may support common interfaces. In C++ such relationships are expressed using derivation and inheritance.




next up previous contents index

Bruno Copyright © 1997 by Bruno R. Preiss, P.Eng. All rights reserved.