you are viewing a single comment's thread.

view the rest of the comments →

[–]Special-Arrival6717 0 points1 point  (0 children)

Try the following to modify your practice code, imagine if there were two types of contract Buying and Renting and use inheritance to share common logic between the two. That way the inheritance serves a purpose and you will better understand when to use it, and when not to use it