Chapter 2. The Fundamentals

In This Chapter

Background

Dealing with something as an integrated whole is self-evidently easier than having to understand and manipulate all of it parts. Thus, to make programming easier, it is commonplace to define classes that serve as integrated wholes, keeping their constituents hidden. Doing so is called encapsulation, which is characteristic of what is known as object-oriented programming.

The C++ programming language provided syntax for encapsulation that proved very popular. In C++, one can write a class like this one:

class Stock { private: char symbol[30]; int number; double price; double value; void SetTotal() { this->value = this->number * this->price; } public: Stock(void); ~Stock(void); ...

Get Microsoft Windows Communication Foundation Hands-on! Beta Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.