What are generic functions and generic classes?

Answer Posted / lokesh singh

when ever we think about generic function, first of all
think why we needed.
if we want to use no of diffrent-diffrent variables in a
programme then we need no of function for that purpose.
generic function is used for preventing function
overloading. due to feature of taking any type of variable.
it have such type of quality.

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats oop mean?

582


Where You Can Use Interface in your Project

1419


What is difference between abstraction and encapsulation?

584


what is graphics

2001


What is difference between oop and pop?

607






What is inheritance in oop?

591


What are the important components of cohesion?

547


Why is abstraction needed?

559


Which is better struts or spring?

610


Explain the advantages of inheritance.

666


What is static in oop?

585


What is the importance of oop?

603


What is the real time example of inheritance?

629


What is meant by multiple inheritance?

729


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.

622