Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.60/5 (3 votes)
See more:
Is static polymorphism is polymorphism? Support your answer with solid reasons
Posted
Comments
Simon_Whale 13-Feb-14 7:14am    
Your question doesn't make sense can you please expand and reword your question

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
The word polymorphism means having many forms. In object-oriented programming paradigm, polymorphism is often expressed as 'one interface, multiple functions'.

Polymorphism can be static or dynamic.

In static polymorphism the response to a function is determined at the compile time.

In dynamic polymorphism , it is decided at run-time.

Static Polymorphism
The mechanism of linking a function with an object during compile time is called early binding. It is also called static binding. C# provides two techniques to implement static polymorphism. These are:

Function overloading

Operator overloading

Dynamic Polymorphism

C# allows you to create abstract classes that are used to provide partial class implementation of an interface. Implementation is completed when a derived class inherits from it. Abstract classes contain abstract methods, which are implemented by the derived class. The derived classes have more specialized functionality.

Please note the following rules about abstract classes:

You cannot create an instance of an abstract class

You cannot declare an abstract method outside an abstract class

When a class is declared sealed, it cannot be inherited, abstract classes cannot be declared sealed.

Please read below article for the examples.

C# - Polymorphism
 
Share this answer
 
Comments
Richard MacCutchan 13-Feb-14 9:21am    
Please don't do people's homework for them. It does not help them to learn how to do their own research.
Sampath Lokuge 13-Feb-14 9:26am    
Just a small help will guide him a right direction though.I hope so ....
Anyway next time I won't :)
Richard MacCutchan 13-Feb-14 9:39am    
This wasn't a small help though. You provided all the information that the student's teacher asked for. Small help is giving a link to a Google search.
Sampath Lokuge 13-Feb-14 9:45am    
OK sure.Next time I'll do that way. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900