Skip to main content

Object-Oriented Programming

Published 2 min readMarkdown

Object oriented programming(OOP), as the word itself defines that it is something related with the objects and orientation in the sense structure of the program. To understand this completely, we need to know some history.

The procedure-oriented programming(POP) is the traditional way of programming, converse to this we have OOP. C is an example of POP where, there is global declaration of variables or data also we have functions. In C the functions are not much concealed, these can be called anywhere in the program and changes can be implemented.

Where as in case of OOP, we have a systematic approach. we have objects within which is data and methods(functions). The data of one object can only be accessible to the methods inside that object. However, methods of one object can be accessible to methods of other object. The data is given more security so OOP is more secured than POP. C++ and JAVA use OOP, C++ is an extension of C and follows some concepts of POP, but JAVA is completely an Object Oriented Programming Language.

Features of OOP

  1. Classes and objects - The structure of OOP is such that, it starts from a class that can be any data type and within class we have objects which is similar to the variables in C.

  2. Abstraction and Encapsulation - The data in the objects is hidden, and can only be accessed by the methods of that object. This is called as Encapsulation. Abstraction represents only the essential features and not in-depth.

3.Inheritance - Object of one class acquire the properties of its ancestors, creating a new object.

4.Polymorphism - That which has many forms is called polymorphism. Suppose there is a method, that performs one operation, now this operation can also be performed on different datatypes.

Java is an Object Oriented Programming Language, which is popular for its use in making applications and is widely used. The main advantage of OOP is that it provides data security that is not seen in C because of pointers.

About the author

  • Tech enthusiast, likes to learn about new technologies and share it in my own words.

No comments yet. Be the first to comment.