Session 15: Dynamic polymorphism
Resources
Zoom meeting link for today's session is available in the Bookmarks on the course Slack channel.
To create the starter repository for today's session please
Programme
C++: |
We consider the concepts of polymorphism and shared type in C++ by reviewing the builtin types and templated types as seen in the previous weeks. We motivate sharing type by considering how objects may change through the lifetime of a program and how templates, whilst allowing polymorphic behaviour, lock the behaviour in when our program is compiled. We show how runtime polymorphism is realised in C++ with public inheritance and pure abstract classes specifying an interface. |