Basic concepts of OOP

The object oriented programming has been developed with a view to overcome the drawbacks of conventional programming approaches. The OOP approach is based on certain concepts that help it attain its goal of overcoming the drawbacks of shortcomings of conventional programming approaches. These general concepts of OOP are given below:

Also Read: How to write and run c/c++ programs in Ubuntu

1. Data Abstraction

Abstraction refers to the act of representing special features without including the background details or explanation.

 2. Encapsulation

The wrapping up of data and operations/functions (that operate on the data) into a single unit (called class) is known as encapsulation.

3. Modularity

Modularity is a property of a system that has been decomposed into a set of cohesive and loosely coupled modules.

4. Inheritance

Inheritance is the capability of one class of things to inherit capabilities or properties of another class.

5. Polymorphism

Polymorphism is the ability for a message or data to be processed in more than one form.

Advantages of OOP

  1. It models real world well.
  2. With OOP, programs are easy to understand.
  3. OOP offers classes reusability. Already created classes can be reused without having to write them again.
  4. OOP facilitates Quick Development as parallel development of classes is possible.
  5. With OOP, programs are easier to test manage and maintain.

Disadvantages of OOP

  1. With OOP, classes tend be overly generalised.
  2. The relations among classes become artificial at times.
  3. The OOP programs design is tricky.
  4. Also one needs to do proper planning and proper design for OOP programming.
  5. To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc.
Source: Text Book: C++ Sumita Arora

Leave a Comment

Your email address will not be published. Required fields are marked *