What are the advantages of inheritance?
Answer Posted / shiavni
inheritance is a process by which object of one class
acquire the properties from the object of another class.
the major advantage of inheritance is reusability which
means that we can add additional feauters into an existing
class without modifying it. this is possible by deriving a
new class from an existing one. i.e. creating new class
called derived class from an existing or created earlier
class called base class. the derived class will have the
combined features of both the classes.
| Is This Answer Correct ? | 56 Yes | 17 No |
Post New Answer View All Answers
write a program to find 2 power of a 5digit number with out using big int and exponent ?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Can you inherit a private class?
What do you mean by variable?
What is destructor oops?
What is encapsulation with example?
What is polymorphism what are the different types of polymorphism?
What is an example of genetic polymorphism?
What is overriding vs overloading?
How long to learn object oriented programming?
What is the real time example of inheritance?
What is an advantage of polymorphism?
Why polymorphism is used in oops?
Can we create object of interface?
How do you use inheritance in unity?