free geoip

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is overriding in c++
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
What is the meant by the overridig
Reply
#2
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.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  what is the differnce b/w overriding and abstraction in c++ 2011? saneha 1 2,160 05-02-2011, 06:23 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