« All Events
6 PM – Intro To Java
August 26, 2021 @ 6:00 pm - 7:00 pm
Homework:
- Continue with MonsterInheritanceSystem. Inside run() method, when user enter “exit” stop the loop and print “Thank you for playing AYCLOGIC Monster Game.” and stop the program.
- If user enter a monster name that is not in the system, just print “We cannot find <monster name> in our system.”
- Create Phoenix.java class. This class needs to inherits from Monster.java class. Override “doDamage” method so when magicAttack is equal to “fire”, print “Fire magic attack will do no damage to Phoenix” and do not reduce the health.
- Create WaterGolem.java class. This class needs to inherits from Monster.java class. Override “doDamage” method so when magicAttack is equal to “water”, print “Water magic attack will do no damage to Water Golem” and do not reduce the health.