Member-only story

Object Oriented Programming Principles Simplified

Codecat15
4 min readSep 18, 2020

--

In this post we will learn about the four pillars of object oriented programming (OOPS).

Starting from the beginning we had C programming which is procedural oriented or you can say more function oriented, you can make robust application in C, a very good example of this would be your windows operating system which is made in C.

So now the question rises that when such brilliant applications can be made by using a procedural oriented language (POP) then why do we need OOP.

The answer that why do we need OOP is given below:

  1. In POP large programs are divided into functions, while in OOP they are divided into class whose object can be used later.
  2. POP has no access specifier (private, public, protected) while OOP has access specifier which help the programmer to have a grip on the variables which carry important data.
  3. In POP most of the function share global data now the disadvantage here is that a function may also try to update the value of the global variable and if any of the function does update the global value then in that case you are not sure about the accuracy of the result that your program will give you.
  4. In POP operator cannot be overloaded.

--

--

Codecat15
Codecat15

No responses yet