What are the advantages of inheritance?
Answer Posted / sudhir kumar
The main advantage of the inheritance is that we can acheive
encapsulation because there is early binding in inheritance.
Means our derived class object is already fix to all
appropriate classes functions. And encapsulation is so
because any body do not know that what are the names of base
classes and their information.
And as every one knows Reuseability....
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Why is oop useful?
What polymorphism means?
What is polymorphism and example?
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?
Where You Can Use Interface in your Project
What is property in oops?
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.
write a program to find 2^n+1 ?
#include
What is overriding vs overloading?
what type of question are asked in thoughtworks pair programming round ?
What is encapsulation oop?
What is class and object in oops?
Who invented oop?