« All Events
7 PM – Intro To Java – Gamas
April 14, 2022 @ 7:00 pm - 8:00 pm
Today We Do
- We learned about Java inheritance. We created Dragon class which extends from Monster class.
- We learned how to override Monster.doMagicDamage(String magicType, int damage) in Dragon class.
Homework
- Continue Monster Inheritance project by creating Troll and WaterGolem classes.
- These classes need to inherit from Monster class. This is very similar to Dragon class.
- In these classes, you need to override Monster.doMagicDamage(String magicType, int damage) method.
- Troll will be immune to earth magic attack (no damage done) and Troll will take only half damage from fire magic attack.
- WaterGolem will be immune to water magic attack (no damage done).