object-oriented programming (OOP)

Contributor(s): Sarah Lewis

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

OOP focuses on the objects that developers want to manipulate rather than the logic required to manipulate them. This approach to programming is well-suited for programs that are large, complex and actively updated or maintained.

The organization of an object-oriented program also makes the method beneficial to collaborative development, where projects are divided into groups.

Additional benefits of OOP include code reusability, scalability and efficiency. Even when using microservices, developers should continue to apply the principles of OOP.

The first step in OOP is to collect all of the objects a programmer wants to manipulate and identify how they relate to each other -- an exercise often known as data modeling.

Examples of an object can range from physical entities, such as a human being who is described by properties like name and address, down to small computer programs, such as widgets.

A depiction of object-oriented programming
An example of the conventions in object-oriented programming.

Once an object is known, it is labeled with a class of objects that defines the kind of data it contains and any logic sequences that can manipulate it. Each distinct logic sequence is known as a method. Objects can communicate with well-defined interfaces called messages.

Principles of OOP

Object-oriented programming is based on the following principles:

  • Encapsulation. The implementation and state of each object are privately held inside a defined boundary, or class. Other objects do not have access to this class or the authority to make changes but are only able to call a list of public functions, or methods. This characteristic of data hiding provides greater program security and avoids unintended data corruption.
  • Abstraction. Objects only reveal internal mechanisms that are relevant for the use of other objects, hiding any unnecessary implementation code. This concept helps developers more easily make changes and additions over time.
  • Inheritance. Relationships and subclasses between objects can be assigned, allowing developers to reuse a common logic while still maintaining a unique hierarchy. This property of OOP forces a more thorough data analysis, reduces development time and ensures a higher level of accuracy.
  • Polymorphism. Objects can take on more than one form depending on the context. The program will determine which meaning or usage is necessary for each execution of that object, cutting down the need to duplicate code.

Object-oriented programming languages

While Simula is credited as the first object-oriented programming language, the most popular OOP languages are:

OOPSLA is the annual conference for Object-Oriented Programming Systems, Languages and Applications.

Criticism of OOP

The object-oriented programming model has been criticized by developers for multiple reasons. The largest concern is that OOP overemphasizes the data component of software development and does not focus enough on computation or algorithms. Additionally, OOP code may be more complicated to write and take longer to compile.

Alternative methods to OOP include:

Most advanced programming languages give developers the option to combine these models.

This was last updated in April 2020

Continue Reading About object-oriented programming (OOP)

Dig Deeper on Application programming languages and coding

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

Do you prefer using the object-oriented programming approach to other design patterns?
Thanks to your help!
It is environment where we work to consider object as real entity. at with other element like data, and method are consider. there some aspect of oops class, object, data abstraction, inheritance, polymorphism etc.
What is object oriented programming?

Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.

The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. Examples of objects range from human beings (described by name, address, and so forth) to buildings and floors (whose properties can be described and managed) down to the little widgets on a computer desktop (such as buttons and scroll bars).

The first step in OOP is to identify all the objects the programmer wants to manipulate and how they relate to each other, an exercise often known as data modeling. Once an object has been identified,  it is generalized as a class of objects (think of Plato's concept of the "ideal" chair that stands for all chairs) which defines the kind of data it contains and any logic sequences that can manipulate it. Each distinct logic sequence is known as a method. Objects communicate with well-defined interfaces called messages.

The concepts and rules used in object-oriented programming provide these important benefits:

  • The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time, and ensures more accurate coding.
  • Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code will not be able to accidentally access other program data. This characteristic of data hiding provides greater system security and avoids unintended data corruption.
  • The definition of a class is reuseable not only by the program for which it is initially created but also by other object-oriented programs (and, for this reason, can be more easily distributed for use in networks).
  • The concept of data classes allows a programmer to create any new data type that is not already defined in the language itself.

Simula was the first object-oriented programming language. JavaPythonC++Visual Basic .NET and Ruby are the most popular OOP languages today. The Java programming language is designed especially for use in distributed applications on corporate networks and the Internet. Ruby is used in many Web applications. Curl, Smalltalk, Delphi and Eiffel are also examples of object-oriented programming languages.

OOPSLA is the annual conference for Object-Oriented Programming Systems, Languages and Applications.

Thanks for helping!
import javax.swing.JOptionPane;
public class Info
public static void
JOptionPane.showMessageDialog(null,"Thanks for the Info!");

No course has ever made me think and reason out ideas as programming. I love programming and software development

Chinasa Chukwu
Before OOP and even now communication is done by subroutines. However what allows programs to understand & thus respond and relate to what being communicated?

The ability to make a single inheritance in a program is called a subroutine. The word inheritance is used to mean multiple inheritance or multiple subroutines based on Darwin classes & Mendel inheritance evolution theory& principle. Based on if I have some experience or element of you in me we can relate.

Is Simula saying it invented subroutines or multiple Inheritance?

From Romana Mendes

OOP/OOFP is a relational evolution program. It is base on if objects can evolve from their simplest form to more complex forms ie machine code to requirement for intranets inheriting similar attribute and names. So when the internet send out say the name or attribute, every machine code, every Ethernet, computer & computer network know what it means and AUTOMUSLY knows what to do
Romana Mendes the invented of object oriented programming or object oriented functional programming. For use with functional programming in 1978. She was the first to use both classes & Inheritance in a computer language. She used OOFP with functional Basic, Fortran, Pascal Agol. She only informed the world she invented in it 1982 because she wanted compliers to evolve and thus relate to each & other so the internet & the world wide web can be made
Love this post!

We have given you great information, we hope that you will continue to provide such information even further. Read More...<a href="">NetKiDuniya</a>