Answer Posted / sree
virtual function comes into picture while inheriting the
base class functions to the derived class functions.
ifthe virtual isnot used then the pointer of derived class
points to the baseclass function
| Is This Answer Correct ? | 28 Yes | 1 No |
Post New Answer View All Answers
Can you explain polymorphism?
Why do we use class?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is encapsulation in oop?
What is a class in oop?
What is a class and object?
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.
Who invented oop?
How Do you Code Composition and Aggregation in C++ ?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is polymorphism and its types?
Whats is abstraction in oops?
What is debug class?what is trace class? What differences are between them? With examples.
How many human genes are polymorphic?
Why is object oriented programming so hard?