Basic Concepts of OOPS (Object Oriented Programming)
Hai friends in this blog, I will show you basic concept of objects oriented programming. In this content show different type of terms.
- Class
- Object
- Data Abstraction
- Data encapsulation
- Inheritance
- Polymorphism
1. Class
It is a type or a category of things. It is similar to a structure with the difference that it can also have functions besides data items. A structure, we have seen, can have only data variables but a class can have data members as well as function members.
2.Object
It is an instance or example of a class. You can imagine it to be similar to a variable of class like we have a variable of a structure.
3.Data abstraction
Data abstraction is like defining or abstraction the object according to the required parameters. For example -if there is a class circle we need to just define the radius of the object of this class. We need not bother about anything else of that object.
4.Data encapsulation
The data of an object is hidden from other objects. This is called as encapsulation. Encapsulation is achieved by putting data and function associated with it into a class. The advantage of the data encapsulation is that the data is hidden from other functions and hence they cannot access it or change it directly. Thus the unexpected change in the data is not possible.
5.Inheritance
The mechanism of deriving the properties of one class into another class is know as inheritance.
6.Polymorphism
Poly refers to multiple and morph refers to different forms. Hence, polymorphism means multiple forms of the same thing.
| Procedure Oriented Programming | Object Oriented Programming |
|---|---|
| It focuses on procedures. | It focuses on data rather than procedure. |
| POP follows top-down approach | OOP follows bottom-up approach |
| Large programs are decomposed into functions. | Programs are decomposed into object. |
| Does not have any access modes | Provides various modes of access e.g private protected and public. |
| Data is not hidden | Data is hidden |
| Data can move freely form function to function | Object can move and communicate with each other through member function. |
| For Example :- C, VB, Fortran | For Example :- C++,Java,Small Talk |


0 Comments