Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What's the full form of STL?

2 Answers  


c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess

1 Answers   HCL, TCS,


Which method cannot be overridden?

0 Answers  


What is polymorphism? Explain with an example.

48 Answers  


what is the difference between a package and a software?

3 Answers  


What is differance between Abstract and Interface

3 Answers  


why we are declare the function in the abstract class even though we are declaring it in Derived class?

1 Answers   TCS,


Name a typical usage of polymorphism

3 Answers  


Can we call a base class method without creating instance?

6 Answers  


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


Can we have a private constructor ?

12 Answers   HSBC, Ness Technologies, TCS, Wipro,


What is the difference between class and structure?

7 Answers  


Categories