Take Up Code
30: Interfaces. The Software Contract.

30: Interfaces. The Software Contract.

Take Up Code

6:51

About this episode

Interfaces give you the ability to define behavior without actually implementing it. Why would you want to do that? Your classes can then declare support for interfaces which means that they promise to support that behavior. How your classes do this is up to them. Declaring support for an interface signals that they do this. You can have what might be completely unrelated classes all supporting the same interface which then allows you to work with them in the same way.

More from Take Up Code

This is the first in a series of comments about the book “How To Code C++ From a Simple Idea To a Game You’ll Understand!” Each episode will be short and focused. You can watch the video versions on Y…

1m