Inheritance says "a WaterCodemon is a Codemon". But sometimes the relationship is "has a". A Team has Codémon. A Codémon has Moves. This is called composition — objects that contain other objects.
↗️
Loading editor...
↶
↷
A Codemonhas a list of Move objects. We can access the move's attributes through the Codémon: myCdm.moves[0].name.