C++ Programming features

The purpose of C++ programming feartures was to add object orientation to C language, which is one of the most powerful programming languages of all.

The important part of object-oriented programming is to create an object. It has certain conditions and methods to follow. While creating C++ modules, we try to see whole world in the form of objects. For example a bike is an object which has certain properties such as model, number of gears, and etc., It also has certain methods such as accelerate, brake, and so on.

The few principle concepts that form the foundation of OOPS are:

Object

This is the basic unit of object oriented programming. That is both data and function that operate on data that are collected as a unit is called as object.

Class

When we are defining a class, we just define a overview for an object. It doesn’t actually define any data, but it will define what an object of the class will consist of and what operations can be applied on that object.

Abstraction

Data abstraction refers to providing only important information to the outside world and hiding their background details, i.e., to represent the needed information in program without presenting the details.

For example, a database system hides certain details of how data is stored and created and maintained. Similar way, C++ classes provides different methods to the outside world without giving internal detail about those methods and data.

Encapsulation

Encapsulation is placing the data and the functions of that data in the same place. While working with procedural languages, it is not always clear which functions work on which variables but object-oriented programming provides you framework to place the data and the relevant functions together in the same object.

Inheritance

One of the most useful aspects of object-oriented programming is code re-usability. As the name suggests Inheritance is the process of forming a new class from an existing class that is from the existing class called as base class, new class is formed called as derived class.

This is a very important concept of object-oriented programming since this feature helps to reduce the code size.

Polymorphism

The ability to use an operator or function in different ways in other words giving different meaning or functions to the operators or functions is called polymorphism. Poly refers to many. That is a single function or an operator functioning in many ways different upon the usage is called polymorphism.

Overloading

The concept of overloading is also a branch of polymorphism. When the exiting operator or function is made to operate on new data type, it is said to be overloaded.