GeekInterview.com
Series: Subject: Topic:
Question: 162 of 357

What are the advantages of inheritance?

Asked by: Interview Candidate | Asked on: Jun 24th, 2005
Showing Answers 1 - 5 of 5 Answers
samiksc

Answered On : Jan 20th, 2006

View all answers by samiksc

Inheritance offers the following advantages --Developement model closer to real life object model with hierarchical relationshipsReusability -- facility to use public methods of base class without rewriting the sameExtensibility -- extending the base class logic as per business logic of the derived classData hiding -- base class can decide to keep some data private so that it cannot be altered by the derived class

  
Login to rate this answer.
ganesh sharma

Answered On : Oct 11th, 2011

Inheritance allows you to propagate a classes' properties and methods into a child class which can then be extended to provide additional functionality. Its main advantage is code reuse, and the ability to extend black box objects about which you have little information, providing for supposedly improved modularity.

  
Login to rate this answer.
afrozyahya

Answered On : Apr 10th, 2012

Describe the use of public, private and protected access specifies.

  
Login to rate this answer.

Helps in reusability of code.
Program development time is reduced.
Helps as security purpose.

  
Login to rate this answer.
Brijendra

Answered On : Sep 23rd, 2012

1) Inheritance is the concept where the child class can concentrate on new features that it want. because all the basic features it will get it from its parent class.

2) It is about re-usability of features.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.