Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is polymorphism? Explain with an example.

Answer Posted / ujjawal ranjan

Polymorphism is a characteristics of OOPS(Object Oriented Programming Language) through which method/function for any class of objects can be called by the same name and each responses according to their type-specific behavior .
The main benefit of polymorphism is that it simplifies the programming interface. It permits conventions to be established that can be reused in class after class.
Instead of inventing a new name for each new function you add to a program the same names can be reused.
It helps in understanding an interface.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation process?

1001


Which language is pure oop?

940


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1237


Why is polymorphism needed?

1001


What is a class oop?

955


Why do we use oops?

960


What is coupling in oop?

968


What is oops concept with example?

967


What is encapsulation in oop?

987


What is stream in oop?

1245


What is ambiguity in inheritance?

1050


What do you mean by Encapsulation?

1017


Why is static class not inherited?

1040


Why interface is used?

955


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

1168