what is a virtual class?
Answer Posted / ritesh parkhi
Virtual class in a part or used to implement Runtime
polymorphism.Through it dynamically we can access a class or
method of that class.With use of Pointer to base class we
can implememt it.We try to access object of any class
without regarding their class.We are passing object address
in this base class pointer to access a particulat method of
a class at runtime.
Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
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.
Can an interface inherit a class?
Please send ford technologies placement paper 2 my mail id
What is object in oops?
can inline function declare in private part of class?
What is destructor oops?
What is abstraction in oop?
What is the important feature of inheritance?
Can a varargs method be overloaded?
What is overloading in oops?
What is encapsulation in oops?
#include
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
Get me an image implementation program.
Why do we use encapsulation in oops?