But after you modify a subprogram, will you remember which subprogram you copied and modified originally? Even worse, you could copy a subprogram and modify it, and then copy your modified subprogram and modify that copy. Do this several times and you’ll wind up with several slightly different versions of the same subprogram, but now you may not have any idea which subprogram you copied originally. So now if you find an error in the original subprogram, how can you find and fix that same error in any modified copies of that subprogram? Most likely, you can’t because you won’t know for sure which modified versions of the subprogram you (or another programmer) might have created. Because programmers are always going to copy an existing program that works, object-oriented programming helps manage the copying process by using inheritance.

The whole idea behind inheritance is that rather than making physical copies of a subprogram, you have only one copy of a subprogram at all times. Instead of physically copying a subprogram, objects inherit a subprogram by essentially pointing to the subprogram that they want to copy. Not only does this save physical space by eliminating the need to make copies of a subprogram, but this also makes it easy to modify subprograms. If you find an error in a subprogram, just correct the error in the original subprogram and that’s it.
Any objects that have inherited commands from that subprogram now point automatically to the modified version of the original subprogram, By isolating commands in objects and using inheritance, objects can get the advantages of copying subprograms without the disadvantages of having multiple physical copies scattered all over the place. Object-oriented programming makes programs easier to write (by dividing a large program into parts), easier to understand (by organizing subprograms into objects that mimic the actual problem the program is trying to solve), and easier to modify (by automatically updating any copies of subprograms). All these advantages allow you, as the programmer, to focus more on solving problems and less on keeping track of trivial details.