answersLogoWhite

0

They are three of the four pillars of object-oriented programming. The fourth is abstraction.

Encapsulation describes the way in which an object is a capsule, a self-contained entity that embeds data and the methods that operate upon that data.

Abstraction describes the way in which it is not necessary to know the underlying storage and implementation details of an object in order to use it. This minimises code maintenance by allowing class designers to modify their implementations without adversely affecting the consumers of those classes, provided the abstract interface remains unaltered.

Inheritance describes the way in which new objects can be derived from existing objects, inheriting all the properties of the existing object and embellishing them with new properties, reducing the need to write duplicate code.

Polymorphism describes the way in which derived objects exhibit correct behaviour dynamically, even when the runtime type of the object cannot be determined at compile time (which is always the case for derivatives that don't yet exist), by exploiting generic, virtual methods of the known classes (the base classes).

User Avatar

Wiki User

11y ago

What else can I help you with?