« All Events
7 PM – Intro To Java – Gamas
April 21, 2022 @ 7:00 pm - 8:00 pm
Homework
- Continue on MonsterInheritance project
- Inside Monster.java, add a new method: doArrowDamage(int amount)
- Inside the method, reduce Monster.health by amount.
- Inside WaterGolem.java, override Monster.doArrowDamage(int amount). This is very similar to how you guys override Dragon.doMagicDamage(String magicType, int damage).
- Inside WaterGolem.doArrowDamage(int amount), just print Water Golem is not affected by arrow attack. No damage is done.