php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does hierarchy mean in concerned with Classes ?
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
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 & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
What does hierarchy mean in concerned with Classes ? - by Vuhelper - 04-29-2011, 07:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  protected inheritance and abstract classes in C++ 2012 Vuhelper 0 1,770 01-14-2012, 05:48 PM
Last Post: Vuhelper
  classes use in c++ May 2011 Vuhelper 1 1,968 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,621 05-02-2011, 06:33 AM
Last Post: Vuhelper
  What is the purpose of using classes if we have the structure saneha 1 3,222 05-02-2011, 06:28 AM
Last Post: Vuhelper
  What are Concrete Classes in c++ 2011? saneha 1 2,443 04-29-2011, 07:47 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support