what is diamond problem?
Explanation with examples:- In OOP(Object-oriented programming language)there is a concept of multiple inheritance. Suppose we have two child classes child1 and child2 that...
View Articlewhat is an Abstract class
An abstract class is a class that has at least one pure virtual function( A pure virtual function can have no code. ). An abstract class is just a model for all derived classes and cannot be...
View ArticleA very simple singleton pattern in c#
If you need a class which can have only one instance , then you can use the following pattern. Although there are many other ways but i sure this is the best and simple way to get the singleton...
View ArticleHow to achieve “is-a” relationship?
“Is-a” relationship is basic element of OOP. This functionality is helps to achieve re-useabilty in our code. Basically “Is-a” relationship also called parent-child relationship between two classes. We...
View ArticleWhich language does not support multiple inheritence?
JAVA Reasons: 1) ambiguity around Diamond problem 2) multiple inheritances does complicate the design and creates problem during casting, constructor chaining etc and given that there are not many...
View Article