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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4762


What is this pointer in oop?

1089


What is the point of polymorphism?

1045


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2214


Why is encapsulation used?

1006


What is a class oop?

1022


What are oops functions?

1039


Why do we use class?

1101


what is graphics

2472


What is abstraction in oops with example?

1308


What is polymorphism explain?

1272


Can a varargs method be overloaded?

1119


What is difference between inheritance and polymorphism?

1040


What is data binding in oops?

1110


Why interface is used?

1032