Infolink

 

Search This Blog

Showing posts with label OOPS Concept with Real-world example. Show all posts
Showing posts with label OOPS Concept with Real-world example. Show all posts

Jan 12, 2014

Polymorphisms in C++

When people talk about polymorphism in C++ they usually mean the thing of using a derived class through the base class pointer or reference, which is called subtype polymorphism. But they often forget that there are all kinds of other polymorphisms in C++, such as parametric polymorphism, ad-hoc polymorphism and coercion polymorphism.

These polymorphisms also go by different names in C++,

Subtype polymorphism is also known as runtime polymorphism.
Parametric polymorphism is also known as compile-time polymorphism.

Ad-hoc polymorphism is also known as overloading. 
Coercion is also known as (implicit or explicit) casting.

Nov 25, 2012

OOPS Concepts (PART-2)

Multiple inheritance

Multiple inheritance is the possibility that a child class can have multiple parents. Human beings have always two parents, so a child will have characteristics from both parents.

In OOP, multiple inheritance might become difficult to handle because it allows ambiguity for the compiler. There are programming languages such as C++ that allow multiple inheritance; however, other

programming languages such as Java and the .NET Framework languages do not allow multiple inheritance. Multiple inheritance can be emulated in .NET using Multiple Interface Inheritance.

Nov 16, 2012

OOPS Concept with Real-world example

Introduction

OOP is Nothing but Object Oriented Programming.According to Wikipedia,  Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs.
Related Posts Plugin for WordPress, Blogger...