Uploaded by Ryan Kisslinger

ch. 11 discussion

advertisement
We might want to use inheritance in our CPP code say if we wanted to make a particular section of our
code reusable with the possibility of adding or removing certain features later on down the line. A child
class can inherit or revoke certain methods from its parent class that it inherited its methods from
without changing the parent class directly. So, in general if you would want to reuse code, as well as add
behavior then inheritance would be the route to take. It works best when the child class is a
specialization of the parent class.
Download