What is polymorphism ? Explain with examples
Answer Posted / k.r.sukumar
Polymorphism means "A single function which is used for
different purposes depending upon the parameters passed"
for eg;
Area is the function name which is used for
calculating areas of the rectangle, triangle and even more.
from this persepective we conclude that area is the single
function which is used for calculating different ones.
area(a);---> Area of the square
area(l,b);---> Area of the rectangle.
Is This Answer Correct ? | 22 Yes | 1 No |
Post New Answer View All Answers
Whats oop mean?
Which is not an object oriented programming language?
What is the difference between encapsulation and polymorphism?
Is enum a class?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
Give two or more real cenario of virtual function and vertual object
What is the difference between a mixin and inheritance?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What is static in oop? What is the diamond problem in inheritance? What is constructor overloading in oop? What is encapsulation with real life example? What is class encapsulation? How does polymorphism work?