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 |
Why do we use virtual functions?
Why is there no multiple inheritance?
Why do we use oops?
How compiler selects(internally) required overridden function in inheritance?
2 Answers CSC, Infinite Computer Solutions,
Describe the difference between a Thread and a Process?
What is protected in oop?
What is difference between inheritance and polymorphism?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
Where is pseudocode used?
There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?
State what is encapsulation and friend function?
what is polymorpsim? what are its types?