A good answer might be:

All video tapes will have a rental price, so the fixes should be made to the parent class VideoTape. If a new member varible rent is added to the base class, and if its constructor and its show() method are modified, the two child classes will inherit these changes. Fixing the parent class fixes all of its children.

End of the Chapter

You have reached the end of the chapter. You may wish to review the following. Click on a blue subject that interests you to go to where it was discussed. To get back here, click on the "back arrow" button of your browser.

The next chapter will discuss further aspects of inheritance.


Click here to go back to the main menu.
You have reached the End.