Basic concepts/characteristics of object oriented programming - BCA, B.Tech_info

Easy way to learn

Wednesday, June 6, 2018

Basic concepts/characteristics of object oriented programming

OOP Characteristics:

  • Objects
  • Classes
  • Data Abstraction 
  • Encapsulation
  • Inheritance
  • Polymorphism
  • Dynamic Binding
  •  Message Passing
concepts of OOP

Objects:

Objects are the basic run-time entities in an object-oriented programming. They may represents a person, a place, a bank account, a table of data or any item that the program has to handle. They may also represents user-defined data such as vector, time and lists. When the program is executed, the object interact by sending message to one another.  

Classes:

Objects contain data, and code to manipulate that data. The entire set of data and code of an object can be made a user-defined data type with the help of class. In fact, objects are variable of the type class. Once a class has been defined, we can create a number of objects belonging to that class. A class is  a collection of objects of similar type. 
Ex. Fruit mango;

Data Abstraction:

Abstractions refer to the act of representing essential features without including background details or explanation. They are commonly known as Abstraction Data Type(ADT).



Encapsulation:

The wrapping up of data and functions into single unit is known as encapsulation. Data encapsulation is a striking feature of a class. The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it. These functions provide the interface between the object's data and the program. 

Inheritance:

Inheritance is the process by which objects of one class acquire the properties of object of another class. The class whose members are inherited is called the Base class and the class that inherits those members is called  Derived class.  It supports class of hierarchical classification.

     The concept of inheritance provides the ideas of reusability. This means we can add essential features to an exciting class without modifying it.

Polymorphism:

Polymorphism is another OOP concept. Polymorphism means the ability to take more than one form. An operation may exhibit different behaviors at different instances. The instances depend upon the type of data used in the operation.  

     Real life example of polymorphism, a person at same time can have different characteristics. 

Dynamic Binding:

Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding means the code associated with,  given procedure call is not known until the time of the call at the run-time. It is associated with polymorphism and inheritance.

Message Passing:

An object program consist of a set of objects communicate with each other. Object communicate with each other by sending and receiving information much the same way as people messages to one another.

No comments:

Post a Comment

Polymorphism in C++