In: Computer Science
Please type answer for i can copy it. Thank you very much.
-Question 1
What is a polymorphism ?
-Question 2
Can you start an algorithm in pseudo code?
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
1)
In a programming language that basically shows polymorphism, objects of classes belonging to the identical hierarchical tree (inherited from a commonplace base class) may possess features bearing the same call — however, every having appropriate behaviors.
For instance, expect there's a base class named Animals from which the subclasses Horse, Fish, and bird are derived. Also, assume that the Animals class has a characteristic called pass, that's inherited by all subclasses mentioned. With polymorphism, each subclass may additionally have its manner of imposing the feature. So, as an example, when the pass function is called in an object of the horse class, the function would possibly reply via displaying trotting at the display. On the other hand, when the same characteristic is known as in an item of the Fish class, swimming might be presented at the screen. Within the case of a fowl item, it can be flying.
2)
Yes, it is often done. Algorithm is basically code to communicate with computer. It is high level code which is transformed to low-level while running through the compiler. But, the pseudocode is a plain english code to which a human can read and interpret its meaning easily without any hustle. Any algorithm can be stated in psudocode to explain.
Kindly revert for any queries
Thanks.