View Single Post
  #2 (permalink)  
Old October 30th, 2006, 07:23 AM
Geo121 Geo121 is offline
Friend of Wrox
 
Join Date: Jan 2006
Location: Fort Wayne, Indiana, USA.
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Well this disappoints me . . .
You have a masters in computer science or computer applications yet you aren't sure of a suitable answer for polymorphism???

Well . . . I will help you out.

Polymorphism is one of the most important and most valuable concepts of programming.
Polymorphism literally means "many forms".
which means the data can be represented in multiple forms.
Even though classes are derived or inherited from the same parent class, each derived class will have its own behavior.
Polymorphism is a concept linked to inheritance and assures that derived classes have the same functions even though each derived class performs different operations.
An example would be if you had a class animal
all animals comunicate in some form just i different ways so you would have an abstract function declared in the parent class talk()
This function will now use polymorphism by example of a dog the dog would inherit this function talk but the dogs talk() function would be different.
animal.talk()
{
    cout << "spoke";
}
dog.talk()
{
    cout << "bark";
}
I hope this helps you but I am kinda upset of course your subject is kinda generalized I don't think a master of computer science should be getting advice on how to pass an interview from an 17 year old high school student. Sorry if this is rude but its just my opinion and doesn't matter right?

 ~ Geo
Reply With Quote