Sponsored Links


Results 1 to 2 of 2

Thread: What does hierarchy mean in concerned with Classes ?

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    Cool What does hierarchy mean in concerned with Classes ?

    Sponsored Links1



  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 03-15-2015, 11:10 PM
  2. classes use in c++ May 2011
    By Vuhelper in forum C++ Programing
    Replies: 1
    Last Post: 05-29-2011, 07:30 PM
  3. Replies: 1
    Last Post: 05-02-2011, 06:33 AM
  4. Replies: 1
    Last Post: 05-02-2011, 06:28 AM
  5. what are classes in java 2011 ?
    By saneha in forum Java forum
    Replies: 1
    Last Post: 04-24-2011, 09:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft