Answer Posted / syed abdul gaffur.
CONSTRUCTOR:
Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.
DISTRUCTOR :
If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Why is polymorphism used?
Which language is not a true object oriented programming language?
Why multiple inheritance is not possible?
What is class in oop with example?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is encapsulation in ict?
What is abstraction in oops?
Why do we use polymorphism?
What is polymorphism give a real life example?
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 solid in oops?
What is inheritance write a program to show use of inheritance?
What is the main purpose of inheritance law?
what are the different types of qualifier in java?
What makes a language oop?