Quick links: C-Tricks HR Interview Que. Code Snippets C Programs C++ Programs Java Programs PHP Examples

Home » C++ programming language

Concepts of Object Oriented Programming System (OOPS) in C++ programming

Learn: What are the concepts of Object Oriented Programming Systems (OOPS) in C++ programming language? Brief description of Class, Object, Inheritance, Data Encapsulation, Data Abstraction and Polymorphism.

OOPS stands for "Object Oriented Programming System" in C++ programming, Here we are discussing abbot the concepts of OOPS (or main features of OOPS).

There are following concepts of OOPS:

  1. Class
  2. Object
  3. Inheritance
  4. Data Encapsulation
  5. Data Abstractions
  6. Polymorphism

1) Class

Class is the template of an object. That logically encapsulates data members and member functions into a single unit. Classes are data type based on which objects are created.

2) Object

Object is a basic unit of OOPS. It has unique name. An object represents a particular instance of a class. We can create more than one objects of a class. The size of class is size of total number of data members of class.

3) Inheritance

Inheritance is the process of creating new class from existing class or base class. By using the concept of Inheritance, we can use implemented (existing) features of a class into another class).

Base class is also known as parent class or super class. The new class that is formed is called derived class. The derived class is also known as sub class or child class. Inheritance is basically used for reducing the overall code size of the program.

4) Data Encapsulation

Data encapsulation combines data members and member functions into a single unit that is called class. The advantage of encapsulation is that data cannot access directly. It is only accessible through the member functions of the class.

5) Data Abstraction

Data abstraction specifies hiding the implementation detail for simplicity. It increases the power of programming language by creating user define data types.

6) Polymorphism

Polymorphism is basic and important concept of OOPS. Polymorphism specifies the ability to assume several forms. It allows routines to use variables of different types at different times. In C++, an operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.

Read more: C++ polymorphism and its types.

Sponsored Links