OOPS Concept Explained

OOPS stands for "Object Oriented Programming" and the S in OOPS refers to "System". It's a programming style that's based on the concept of objects or It's a way of writing a program based on the concept of objects. There are many other programming paradigms followed in the software developement industry and Object Oriented Programming paragidm is one of the most popular. 

Java, Python, C# and Ruby are some of the famous programming languages that follow the OOPs concept. Object Oriented Programming language includes below six major concepts to solve all the real world problems.
  • Class
  • Object
  • Polymorphism
  • Inheritance
  • Encapsulation
  • Abstraction

Class: Class is an blueprint or template. Without class we can't write a OOPS programing language and class defines the structure and behavior for an object. Class contains data(variables or attribute) and methods. Objects can be created inside a class and methods(functions) are the behavior of an object.


Object:  It's  an instance of a class. Each class can contain many number of objects and in oops objects represent a class. Using the object of a specific class we can call it's attributes(variables) and methods(functions) anywhere. 

Polymorphism: Poly means many and morphism means types. This approach allows the developer to use a single function for different purpose. Example: the symbol "+" is used for addition and also for concatenating two or more Strings. 

Inheritance: This concept helps to derive the properties or characteristics of one class to another class. The class used to derive is know as parent class or base class and the class which derived is know as child class or sub class.  This approach allows the developer community to achieve code reusability. 

Encapsulation: In OOPS it's a data hiding process. Encapsulation means hiding internal details of any object and exposing only the necessary piece of code to outside classes. This allows to control the access(manipulate the data) of an object's data and ensure data integrity.

Abstraction: In OOPs it's a method hiding process. Abstraction means hiding the method implementation details to a system and expose only the functionality.

Post a Comment

Previous Post Next Post
B