Advantage of Inheritance in OOPsBut one may argue that across all classes, you have a repeated pieces of code.To overcome this, you create a parent class, say 'account' and implement the same function of deposit and withdraw. And make child classes inherited 'account' class. So that they will have access to withdraw and deposit functions in account class. - Study24x7
Social learning Network
05 Apr 2019 10:21 AM study24x7 study24x7

Advantage of Inheritance in OOPsBut one may argue that across all classes, you have a repeated pieces of code.To overcome this, you create a parent class, say "account" and implement the same function of deposit and withdraw. And make child classes inherited "account" class. So t...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles