Start your All-Access Pass to unlock this challenge
Challenge 1 / 1
In the previous challenge, we created a NameableItemTrait
and used it inside of GasPlanet
and SolidPlanet
.
But, there was another option: create a new AbstractPlanet
class, move the logic there, and then extend this class.
In this situation, what was a better option: using a trait
or extending a base class
?
Skip challenges and go to theNext Chapter