Advantage of inheritance
- It 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.
- Saves time and effort as the main code need not be written again.
It permits code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.