September 2019
Intermediate to advanced
792 pages
19h 42m
English
One day Trurl the constructor put together a machine that could create anything starting with n.—Stanislaw Lem, The Cyberiad

In this chapter, you’ll learn what polymorphism is and the problems it solves. You’ll then learn how to achieve runtime polymorphism, which allows you to change the behavior of your programs by swapping out components during program execution. The chapter starts with a discussion of several crucial concepts in runtime polymorphic code, including interfaces, object composition, and inheritance. Next, you’ll develop an ongoing example of logging bank transactions with multiple kinds of loggers. You’ll ...
Read now
Unlock full access