Take Up Code

28: Composition. The Has-A Relationship.


Listen Later

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 even allow you to substitute what kind of wheels your cars have. This can not only simplify your designs but make your code easier to test.
...more
View all episodesView all episodes
Download on the App Store

Take Up CodeBy Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

111 ratings