04-29-2011, 07:45 AM
What does hierarchy mean in concerned with Classes
|
What does hierarchy mean in concerned with Classes ?
|
|
04-29-2011, 07:45 AM
What does hierarchy mean in concerned with Classes
04-29-2011, 07:45 AM
A set of classes and their interrelationships is called class hierarchy.
When a method is invoked on an object it is first looked for in the object’s class, then the superclass of that class and son on up the hierarchy until it is found. Thus a class need only define those methods which are specific to it, and inherit methods from all its superclasses. Example: Class C is derived from class of B, and B class is derived from class A. Now class C object accessed the method (for example) getAge(), then it first looked in class C, if not found, then looked in class B, if not found, then looked in class A. 0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| protected inheritance and abstract classes in C++ 2012 | Vuhelper | 0 | 1,749 |
01-14-2012, 05:48 PM Last Post: Vuhelper |
|
| classes use in c++ May 2011 | Vuhelper | 1 | 1,955 |
05-29-2011, 07:30 PM Last Post: Xpert |
|
| in abstract classes where abject donot extensiate,why we make concrete classes in it? | saneha | 1 | 2,610 |
05-02-2011, 06:33 AM Last Post: Vuhelper |
|
| What is the purpose of using classes if we have the structure | saneha | 1 | 3,213 |
05-02-2011, 06:28 AM Last Post: Vuhelper |
|
| What are Concrete Classes in c++ 2011? | saneha | 1 | 2,429 |
04-29-2011, 07:47 AM Last Post: Vuhelper |
|