All object-based languages (C#, Java, C++, Smalltalk, Visual Basic, etc.) must contend with three core principals, often called the pillars of object-oriented programming (OOP):
Encapsulation: How does this language hide an object's internal implementation details and preserve data integrity?
Inheritance: How does this language promote code reuse?
Polymorphism: How does this language let you treat related objects in a similar way?
Before digging into the syntactic details of each pillar, it is important that you understand the basic role of each. Here is an overview of each pillar, which will be examined in full detail over the remainder of this chapter and the next.
The first ...