Tag: Polymorphism

Polymorphism in C++

Simply speaking, polymorphism is the ability of something to be displayed in multiple forms. Let’s take a real life scenario; a person at the same time can perform several duties as per demand, in the particular scenario. Such as, a man at a same time can serve as a father, as a husband, as a son, and as an employee. So, single person possess different behaviors in respective situations. This is the real life example of polymorphism. Polymorphism is one of the important features of Object Oriented Programming (OOP).

Read More

Advanced C++ Inheritance Techniques for Effective Object-Oriented Programming

In Object Oriented Programming Inheritance is the process by which objects of one class acquire the properties and functionality of objects of another class. In the last tutorial on inheritance in C++ we developed a model using modes of transportation to illustrate the concept of inheritance. In this article we will use that model to illustrate some of the finer points of inheritance and what it can be used for.

Read More

Inheritance in C++

The principle of inheritance is available with several modern programming languages and is handled slightly differently with each. C++ allows you to inherit all or part of the members and methods of a class, modify some, and add new ones not available in the parent class. You have complete flexibility, and as usual, the method used with C++ has been selected to result in the most efficient code execution.

Read More

Polymorphism: Object Oriented Programming (OOP)

In OOP terms, polymorphism represents the ability to resolve a reference to an object’s method at run time. Specifically, different objects could make a call to a Draw or Print method, and these methods would act differently with each object; the process can take different forms behind a common interface. One of the benefits of polymorphism is that because the interface is common to objects, any object is able to respond differently to some common set of tasks, and objects are independent of each other.

Read More

Object Oriented Programming Techniques

Any program which uses these five methodologies or any of it, we can call that program object oriented. They are Encapsulation, Data Hiding, Overloading, Polymorphism, Inheritance. Any programming language which supports all of these features and facilitate the programmer in developing the program in these methodologies is called Object Oriented Programming Language i.e. C++, Java, C#.

Read More
  • 1
  • 2