What is virtual Function.
Answer / poonam
Virtual function is a function that uses keyword "virtual"
with the datatype of the function. When the base class as
well as the derived class contains a function both having
the same name, just to resolve ambiguity and copy of the
same data again and again we use the keyword "virtual"
preeceeding it. It is used to achieve poymorphism.
Is This Answer Correct ? | 7 Yes | 0 No |
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.
What is destructor oops?
How do you use inheritance in unity?
What is and I oop mean?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is abstraction with example?
What is the difference between encapsulation and polymorphism?
Can we create object of interface?
what is the difference between a package and a software?
i^=j; j^=i; i^=j; value of i,j
What are the benefits of oop?
What is inheritance write a program to show use of inheritance?