Podcast Episodes

31: Getters And Setters Keep It Together.

Your classes will likely have data members so how do you work with these data members? Should they be public? Private? Do you let other code access them directly? And what is the difference between a field and a property? This episode will help you get and set your data members.

QA Friday 2016-Jan-01

How are namespaces and include files related and why do we need both?

30: Interfaces. The Software Contract.

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. […]

29: Abstract Classes. Incomplete On Their Own.

What if you were writing a class that you wanted to be a base class? A class designed from the very beginning to bring together other classes with common behavior. What if you also wanted to guarantee that this class could never be created by itself? That it must always exist as a base class […]

28: Composition. The Has-A Relationship.

Composition allows you to specify very different kinds of relationships between classes. This is sometimes also called containment. If you are building a racing game and have a car class and a wheel class, you would not want to say that cars are wheels but instead that cars have wheels. Proper use of composition will […]