Mark As Completed Discussion

Fundamental Properties of Object-Oriented Programming

In this lesson, we will discuss the four fundamental properties of Object-Oriented Programming. These are the building blocks of programming in the OOP paradigm. In fact, OOP was actually primarily invented to help programmers enforce and follow these four basic properties while writing code.

The four properties of OOP we'll cover are:

  1. Encapsulation
  2. Abstraction
  3. Inheritance
  4. Polymorphism

If a programming language supports these four properties, then it is classified as an OOP language. Java, C++, Python, and Javascript all belong in this category. However, for a language to be considered a Pure Object Oriented Programming Language, it must follow three additional rules. Those are:

  1. Each primitive type must be an object.
  2. Each user-defined type must be an object.
  3. All operations on objects must be performed by invoking a method associated with an object.

Pure OOP languages have a lot of limitations in terms of practical usage which is why they are pretty rare. The only pure OOP language that is close to popular is Smalltalk.

In this lesson, we will go through the four fundamental properties one by one and give examples of each. Instead of using the keyboard-monitor example, we will use a more trivial Shape example. We will design an object-oriented architecture to represent different kinds of shapes.

Fundamental Properties of Object Oriented Programming