- Overview
-
Table of Contents
- Special Member Functions: Constructors, Destructors, and the Assignment Operator
- Operator Overloading
- Memory Management
- Templates
- Namespaces
- Time and Date Library
- Streams
- Object-Oriented Programming and Design Principles
- The Standard Template Library (STL) and Generic Programming
- Exception Handling
- Runtime Type Information (RTTI)
- Signal Processing
- Creating Persistent Objects
- Bit Fields
- New Cast Operators
- Environment Variables
- Variadic Functions
- Pointers to Functions
- Function Objects
- Pointers to Members
- Lock Files
- Design Patterns
- Dynamic Linking
- Tips and Techniques
- Five Things You Need to Know About C++11 Unions
- A Tour of C99
- A Tour of C1X
- C++0X: The New Face of Standard C++
- C++0x Concurrency
- The Reflecting Circle
- We Have Mail
- The Soapbox
- Numeric Types and Arithmetic
- Careers
- Locales and Internationalization
Object-Oriented Programming and Design Principles
Last updated Jan 1, 2003.
Despite a common belief to the contrary, object-oriented programming isn't new. Back in the late 1960s, the Modula programming language already implemented many of the principles of this paradigm. Smalltalk, which appeared in 1972, was the first pure object-oriented language. Unlike other languages, it enforcedrather than enabledstrict object-oriented practices. Although Smalltalk never gained much popularity, it inspired many other programming languages such as Eiffel and Java (but not C++), which adopted its object model. The primary data abstraction mechanism in OO programming languages is a class. A class is a user-defined type that represents an object or a concepta file, a hardware device, a database record, a document, an airplane, etc. An object is an instance of a class, just like a variable in procedural programming languages is an instance of a type. Before we continue our discussion, let's look at the principles of object-oriented programming and see how they're implemented in C++. The six major criteria are as follows:
- Abstract datatyping
- Information hiding
- Encapsulation
- Inheritance
- Polymorphism
- Dynamic binding
