Faqts : Business : Programming : Shopping For You : C++

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 15 people (40%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

C++: Class: Inheritance: What is inheritance?

Aug 25th, 2009 00:09
Joe Bloggs, Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 27 September 2003 - 05:42 pm ------------------

C++: Class: Inheritance: What is inheritance?

---

The basic idea is that you can 'copy' information (=variables,
functions and procedures) from another class to your current class.

After which you can 'add' or 'insert' extra information (=variables,
functions and procedures) to your current class, to further adapt it to
your needs.

---
---

Inheritance is the process by which one object can aquire the
properties (=variables, functions and procedures) of another object.

---

This is important, because it supports the concept of 'classification'.

---

For example:

A 'Red Delicious' apple is part of the 'classification'
'apple'.

Which in turn is part of the 'fruit' class.

Which in turn is part of the larger class 'food'.

---

Without the use of classifications, each object would have to
explicitely define all of its characteristics.

---

However, through the use of 'classifications', an 'object' need only
define those qualities that make it unique within its class.

---

It is the 'inheritance' mechanism that makes it possible for one
'object' to be a specific instance of a more general case.

---

Inheritance is supported by allowing one class to incorporate another
class into its declaration.

---

Inheritance allows a hierarchy of classes to be built, moving from the
most general to the most specific.

---

The process involves first defining a 'base' class, which
defines those qualities 'common' to all objects derived from that
'base' class.

---

The 'base' class represents the most general description.

---

The classes derived from the 'base' class are usually referred to as
'derived' classes.

---

A 'derived' class includes all features of the generic 'base' class and
then adds qualities specific to the 'derived' class.

---

[book: source: Schildt, Herbert - C++, the complete reference / 2th 
edition - McGraw-Hill - ISBN 0078821231 - p. 253, 266 'Inheritance']

---
---

Note: here 'base' class can also be read as 'parent' class and
'derived' class can also be read as 'child' class.

---
---

Internet: see also:

C#: Class: Inheritance: What is inheritance?
http://www.faqts.com/knowledge_base/view.phtml/aid/24870

Delphi: Class: Inheritance: What is inheritance?
http://www.faqts.com/knowledge_base/view.phtml/aid/24869

Java: Class: Inheritance: What is inheritance?
http://www.faqts.com/knowledge_base/view.phtml/aid/24864

----------------------------------------------------------------------

======================================

http://www.attorneyslawyersdirectory.com
http://www.findattorneyslawyers.com
http://www.goodlawyersattorneys.com
http://www.professionallawyersattorneys.com
http://www.bestprofessionallawyers.com
http://www.americalawyersattorneys.com
http://www.availablelawyers.com
http://www.lawyersattorneyslist.com
http://www.lawyersattorneysfirm.com
http://www.originallawyers.com
http://www.lawyersgulf.com
http://www.lawyersband.com
http://www.lawyersdatacenter.com
http://www.lawyerstigers.com
http://www.lawcliff.com
http://www.tidylawyers.com
http://www.lawyersblock.com
http://www.californialawyersattorneys.com
http://www.chicagoattorneyslawyers.com
http://www.goodcalifornialawyers.com
http://www.lawyersattorneysfaqs.com
http://www.divorceattorneyslawyers.com
http://www.duiattorneyslawyers.com
http://www.personalinjurylawyerslist.com
http://www.injurylawyersattorneys.com
http://www.dwilawyersattorneys.com
http://www.healthbigboss.com
http://www.healthdohealth.com
http://www.healthcass.com
http://www.healthsilence.com
http://www.healthpicnic.com
http://www.blackmesothelioma.com
http://www.affordablelawyersattorneys.com
http://www.pickarticles.com
http://www.pickarticle.com
http://www.bloodyarticles.com
http://www.healthment.com
http://www.healthbyhealth.com
http://www.ehealthebooks.com
http://www.bestproductsofhealth.com
http://www.dietlosingweight.com
http://www.americanehealth.com
http://www.healthydepartment.com
http://www.medicalehealth.com
http://www.healthservicescenter.com
http://www.ehealthenews.com
http://www.ehealthdept.com
http://www.benefitshealthcenter.com
http://www.toplawyersattorneys.com 
http://www.healthxhealth.com
http://mesotheliomakiller.com
http://www.healthinhealth.com
http://www.booksyshop.com
http://www.mesotheliomaout.com
http://www.mesotheliomadown.com
http://www.qwesz.com
http://americanahost.com
http://www.healthfirewall.com
http://www.healthbodyguard.com
http://www.flathealth.com
http://www.computerstan.com
http://www.financestan.com
http://www.technologystan.com
http://www.zobab.com
http://www.businessian.com
http://www.tarabiza.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.hantira.com
http://www.mantofa.com
http://www.tantofa.com
http://www.fantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.uploadarticles.com
http://www.articlesfreedirectory.com
http://www.articlesxarticles.com
http://www.shikapika.com
http://www.ganazat.com
http://www.stakoza.com
http://www.stupidarticles.com
http://www.damima.com
http://www.halazona.com
http://www.best-cheap-web-hosting.com

======================================