Sponsored Links

Results 1 to 2 of 2

Thread: what is overriding in c++

  1. #1

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    The Concept of Overriding is related with Inheritance.
    You know that in inheritance, derived class has right to own all the data and behavior of its base class. It is seen practically that at least one situation might be occure among the below listed, while in inheritance under the concept of Overriding a function.

    1- Derived class uses the overrided function as it is, from base class
    2- Derived class extends somehow the behavior of Overrided function as per its needs
    3- Derived class restrict somehow the behavior of Overrided function as per its needs.

    Secondly, as you also know very well that Inheritance "is a" relationship i.e Triangle is a Shape, so in this sentence Triangle is the derived class of Shape.

    Definitely, Triangle owns all the functionality of its base class Shape. Lets suppose there is a function” Draw" in its base class that can be accessed by an Object of Triangle and use it. But, in order to draw a triangle , some extension is required in the function Draw. So, this extension in the function of base class that is used by derived object as per needs is called extension in the existing functionality and is also known as sub typing.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 05-02-2011, 06:23 AM

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 | Jobs