1.

What are the advantages offered by inheritance?

Answer»
  • Inheritance ensures the closeness with the real-world models.
  • Allows the code to be reused as many times as needed. The base class once defined and once it is compiled, it need not be reworked. 
  • We can extend the already made classes by adding some new features.
  • Inheritance is capable of simulating the transitive nature of real-world’s inheritace, which in turn saves on modification time and efforts, if required.


Discussion

No Comment Found

Related InterviewSolutions