Answer Posted / swetcha
Use the new modifier to explicitly hide a member inherited
from a base class. To hide an inherited member, declare it
in the derived class using the same name, and modify it
with the new modifier.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Explain virtual inheritance?
Can enum be null?
What is inheritance in oop?
Who invented oop?
What is the significance of classes in oop?
What is debug class?what is trace class? What differences are between them? With examples.
Why do we need polymorphism in c#?
What are functions in oop?
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.
Why is destructor used?
What is the diamond problem in inheritance?
Why is polymorphism used?
what is the drawback of classical methods in oops?
What is overloading and its types?