what is the difference between containership and inheritence?



what is the difference between containership and inheritence?..

Answer / sandeep choudhary

inheritance is the ability for a class to inherit of
properties and the behavior from a parent class by extending it.

while containership is the ability of a class to contain the
another objects as member data.

if a class is extended, it inherits all the public and
protected properties and the behaviors and those behavior
may be overridden by the sub class.but if a class is
contained in another, container class does not have the
ability to add and modify of contained.

Is This Answer Correct ?    47 Yes 2 No

Post New Answer

More OOPS Interview Questions

Difference between new operator and operator new

2 Answers  


explain the concepts of oops?

1 Answers  


Why do pointers exist?

0 Answers  


how to get the oracle certification? send me the answer

0 Answers   Oracle,


Get me an image implementation program.

0 Answers  






What do we mean by a hidden argument in a function?

1 Answers   TCL,


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

0 Answers  


What is stream in oop?

0 Answers  


20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?

5 Answers   IonIdea,


what are the different types of qualifier in java?

0 Answers   TCS,


char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output

9 Answers   Persistent,


write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language

3 Answers   Satyam,


Categories