What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 26728 |  Welcome, Guest!   Register  Login
 Home > Forums > Ask Interview Questions > what is advantages of polymorphism ...
Yugandhar

what is advantages of polymorphism

Replies: 6 | Posted by: Yugandhar on 9/1/2012 | Category: Ask Interview Questions Forums | Views: 2582 | Status: [Member] | Points: 10  


what is advantages of polymorphism
how it can help in oops
plz provide information but not links


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Gopesh9
Gopesh9  
Posted on: 9/3/2012 12:52:55 AM
Level: Starter | Status: [Member] | Points: 25

Polymorphism is one of the features provided by OOP. We can say that polymorphism makes it possible to call different methods using one interface. We can also say that it means taking multiple advantages from one thing.

G. S.
.Net Developer

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Ranjeet_8
Ranjeet_8  
Posted on: 9/3/2012 1:14:21 AM
Level: Gold | Status: [Member] | Points: 25

It is the ability to appear in different forms. In oops concept, it is the ability to process objects differently depending on their data types. Its the ability to redefine methods for derived classes.

There Are Two Types of Polymorphism
1.Run time Polymorphism :
.Run time Polymorphism also known as method overriding
.Method overriding means having two or more methods with the same name , same signature but with different implementation
2.Compile time Polymorphism :
.Compile time Polymorphism also known as method overloading
.Method overloading means having two or more methods with the same name but with different signatures

For more info plz read this article
http://www.dotnetfunda.com/articles/article1005-basic-concepts-of-oop-polymorphism.aspx

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Maheshvishnu
Maheshvishnu  
Posted on: 9/3/2012 1:22:15 AM
Level: Starter | Status: [Member] | Points: 25

Method overloading
Method overriding
method hiding

The above 3 features comes under Polymorphism

mahesh

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Shanky11
Shanky11  
Posted on: 9/3/2012 3:14:59 AM
Level: Starter | Status: [Member] | Points: 25

because by defining same name we can perform diff calculation by pass diff argument
class abc
{
public int add(int a ,int b)
{
return a+b;

}
public int add()
{
return a- b;

}
class test
{
public static void main ()
{
abc a1=new abc();
int res=a.add(25,12);
int res1 = c1.add(48,12)
console.wrtline(res);.............. ans 37
console.wrtline(res1);.............. ans 36
}
}

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 9/5/2012 8:25:30 AM
Level: Bronze | Status: [Member] | Points: 50

Resolved

Polymorphism means the ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends on the data types used in the operation

Advantages of polymorphism:

- Same interface could be used for creating methods with different implementations
- Reduces the volume of work in terms of distinguishing and handling various objects
- Supports building extensible systems
- Complete implementation can be replaced by using same method signatures

Advantages of dynamic binding:

- Compiling time is much lower and allows faster development
- The current state of the program is better known to the runtime linker, so that the memory and its resources can easily be reordered
- The addresses symbols which may not be known at compile time, can be resolved by the runtime linker. This process is ideal for networked systems
- Common resources could well be shared instead of duplicating them in each time of execution.

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Hariinakoti
Hariinakoti  
Posted on: 9/5/2012 10:31:02 AM
Level: Starter | Status: [Member] | Points: 25

Good Explanation Ms.Muhsinathk

Thanks & Regards
Hari

Yugandhar, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 2:31:41 AM