Advanced Objects
Inheritance Builder: Creature Academy
Build two child classes that share a parent ability and each add a unique power.
Build two children from one parent.
Creature already knows fly(). Dragon and Unicorn inherit that shared method, then each adds one special power.
Shared: both can
fly()Dragon adds: breatheFire()Unicorn adds: heal()1. Build
Add Dragon and Unicorn to the class family.
2. Test inherited behavior
Press fly() once on each creature.
3. Test special behavior
Make Dragon breathe fire and Unicorn heal.
Creature
fly()shared parent methodAdd both child classes
See generated JavaScript
Build a child to begin.
No child classes built yet.
Build 2 childrenUse shared fly()Use both special powers
Children inherit fly() without rewriting it.
Creature family complete!
Both children inherited the parent method and kept unique powers.
Completed! Try Inheritance Challenge