473,408 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

what the use of Polymorphism?

hello,

Exactly where we use the Polymorphism concept in a real time appliction.

please explian in detail.

thank u
Sep 1 '06 #1
4 10560
Read about polymorphism here

http://en.wikipedia.org/wiki/Polymor...ter_science%29

Its a not a topic that someones going to explain in detail in a newsgroup
response.

Regards

John Timney (MVP)
"chandu" <na*************@hotmail.comwrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
hello,

Exactly where we use the Polymorphism concept in a real time appliction.

please explian in detail.

thank u

Sep 1 '06 #2
HI,
You would use it when you need a class that could be used in different
ways. For instance try creating a 'Person' interface and then implement that
interface in a class called 'Man' - implement another class the 'Person'
interface and call this class 'Women' - Now both the 'Man' & 'Women' Classes
derive there members from the Person interface. The 'Man' is a 'Person' and
the 'Women' is a person. If we had created just two classes called 'Man' and
'Women' then they would have no connection and would also use most of the
same member names, even with the same logic. In a real time application you
would use it exactly the same way - You will need to plan your project with
polymorpism in mind, compare types, do they implement many of the same
features?

James
http://www.bandwidthvista.com

"chandu" <na*************@hotmail.comwrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
hello,

Exactly where we use the Polymorphism concept in a real time appliction.

please explian in detail.

thank u

Sep 1 '06 #3
Download the C# spec to read.
http://msdn.microsoft.com/netframewo...r/default.aspx

chanmm

"chandu" <na*************@hotmail.comwrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
hello,

Exactly where we use the Polymorphism concept in a real time appliction.

please explian in detail.

thank u

Sep 1 '06 #4
chandu wrote:
Exactly where we use the Polymorphism concept in a real time appliction.

please explian in detail.
Try study the GoF patterns in details.

Plenty of good usage of polymorphism there.

Arne
Sep 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mayer Goldberg | last post by:
Can someone please explain the motivation behind the following restriction in the language: I define an interface and two classes implementing it: public interface InterA {} public class B...
3
by: E. Robert Tisdale | last post by:
polymorph just means "many form(s)". The definition in plain English http://www.bartleby.com/61/66/P0426600.html and narrower definitions in the context of computer programming ...
7
by: Samee Zahur | last post by:
Hello, The other day I was rather shocked to find that I couldn't find a good use for runtime polymorphism! Let me explain this a bit further before you get shocked. Any function that I could...
11
by: richard pickworth | last post by:
Can anyone explain polymorphism?(very simply). thanks richard
4
by: LP | last post by:
Hi, I understand the concept/definition of polymorphism. But what does the term "runtime polymorphism" mean? I was asked to define it during a technical interview. I gave a guy vanilla definition...
18
by: voidtwerp | last post by:
what is polymorphism?
18
by: Seigfried | last post by:
I have to write a paper about object oriented programming and I'm doing some reading to make sure I understand it. In a book I'm reading, however, polymorphism is defined as: "the ability of two...
17
by: Zytan | last post by:
Aren't all classes interfaces? What constitutes an interface (and with it, the "I" prefix distinction)? Zytan
11
by: chsalvia | last post by:
I've been programming in C++ for a little over 2 years, and I still find myself wondering when I should use polymorphism. Some people claim that polymorphism is such an integral part of C++,...
17
by: Bart Friederichs | last post by:
Hello, I created the following inheritance: class Parent { public: void foo(int i); }; class Child : public Parent {
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.