AllExperts > Object Oriented Programming 
Search      
Object Oriented Programming
Volunteer
Answers to thousands of questions
 Home · More Object Oriented Programming Questions · Answer Library  · Encyclopedia ·
More Object Oriented Programming Answers
Question Library

Ask a question about Object Oriented Programming
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Marty Landman
Expertise
Available for questions involving packaging, writing and using methods, and generally most object oriented techniques. Conversion from modular (routine based) to OOP (object based) is a pet interest of mine. My language experience in this area is (in order of competence) Perl C++ PHP Visual Basic/ASP Java

Experience
Programmer since 1980, web developer since 1998.

Education/Credentials
M.S. in Computer Science from New York University

 
   

You are here:  Experts > Computing/Technology > Perl/PHP > Object Oriented Programming > Inheritance

Object Oriented Programming - Inheritance


Expert: Marty Landman - 7/1/2009

Question
What is inheritance in detail with one fair example.

Answer
Pavan,

Inheritance is a way to provide reusability automatically and in a common sense way. For instance, there might be a class of members, with methods defined for

member.info
member.blog

Now if you define a subclass of member called premium_member then as a subclass of member, premium_member inherits all the member methods. Therefore you have info and blog methods automagically available for premium_member's.

Hope this is helpful.

--
Marty Landman, Face 2 Interface Inc.
Free Database Search App: http://face2interface.com/Products/FormATable.shtml

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.