listings-Chap19-README.md
Listings of Chap19.docx
This is linked summary of the listings. You can also view it on one page.
- Listing 19.1: Call-by-reference as a basis for polymorphism.
- Book: lst-0002-book.cpp
- Godbolt: lst-0002-godb.cpp, https://godbolt.org/z/71fE4zKhj
- Listing 19.2: The Book class serves the reader and librarian actors.
- Book: lst-0003-book.cpp
- Godbolt: lst-0003-godb.cpp, https://godbolt.org/z/fdh4n5x84
- Listing 19.3: The changes of an actor usually only take place in one class.
- Book: lst-0004-book.cpp
- Godbolt: lst-0004-godb.cpp, https://godbolt.org/z/Tq9xbGxs4
- Listing 19.4: Does not follow the open/closed principle.
- Book: lst-0005-book.cpp
- Godbolt: lst-0005-godb.cpp, https://godbolt.org/z/vxTsveGjT
- Listing 19.5: Follows the OCP.
- Book: lst-0006-book.cpp
- Godbolt: lst-0006-godb.cpp, https://godbolt.org/z/M6hsYa7or
- GodboltId:rc67xWWfT
- Book: lst-0007-book.cpp
- Godbolt: lst-0007-godb.cpp, https://godbolt.org/z/rc67xWWfT
- Listing 19.6: Covariance for return types.
- Book: lst-0008-book.cpp
- Godbolt: lst-0008-godb.cpp, https://godbolt.org/z/Gxh4edc8n