Object Orientated Programming: What Is It?

Published: December 07, 2018Updated: May 30, 2022
2 min to read
Object Orientated Programming: What Is It?

Object-oriented programming (OOP) moves away from tradition procedural programming and uses objects, logic and data. It is one of the main tools in a programmer’s tool kit.

Rather than focusing on the actions that a programmer must carry out if he wants to change an object, OOP keeps the focus on the object itself. This leads to a much easier code analysis and there is less time spent in development because the objects can be reused in other projects.

Most of the programming languages use procedural and Object Orientated Programming including C++, Java, Python and Object Pascal.

Object Orientated Programming

OOP is a much more efficient way of developing software. Developers can sort objects into classes and assess the relationships between them; in this way it enables much developers to work more collaboratively.

The four core principles of Object Orientated Programming are:

  • Encapsulation
  • Abstraction
  • Inheritance
  • Polymorphism

This may sound complex but can be explained very simply.

Polymorphism

This is divided into two functions both of which allow objects to be used depending on context:

  • Overriding — (run-time polymorphism) where objects have the same method and one is the parent and theother the child class.
  • Overloading — (compile time polymorphism) when two objects have the same method and class but havevery different parameters.

Encapsulation

This keeps objects secluded so that other objects cannot change them. This is useful when the objects need to communicate but have different logics which need to be maintained in tact.

Abstraction

This is essentially an extension to the principle of encapsulation and it will mean that only the necessary objects are exposed to any other objects that need to interact with them, everything else remains hidden. This is used to make things simpler and means that changes can be made more easily and quickly.

Inheritance

Where several objects are present and share most of the common logic while retaining elements of unique logic the principle of inheritance allows developers to reuse common logic and extract the unique logic. This creates a hierarchy which is both accurate and unique.

Common Object-Oriented Programming Languages:

OOP is used by many different languages including:

  • Java — 1995, developer: Sun Microsystems, now known as Oracle
  • Python — 1991 — created with an emphasis on readability of code
  • C++ — an extension of the C language with multiple features
  • Objective-C — the main programming language used of OSX and iOS.

If you’re looking for a company that provides quality assurance and testing and other software development services contact us.

Share:
Be the first to receive our articles

Latest Articles


We use cookies to ensure that we give you the best experience on our website.
We also use cookies to ensure we show relevant content.