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 |
advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me
what isthe difference between c structure and c++ class
What is coupling in oops?
how does a main() in C++ is different from main() in C?
can you explain how to use JavaBean in Project
explain sub-type and sub class? atleast u have differ it into 4 points?
What do you mean by public, private, protected and friendly?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
some one give d clear explanation for polymorphism
What is virtual function?where and when is it used?
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?
What does I oop mean?