« All Events
5 PM – Intro To Java – Private – Gamas
March 16, 2023 @ 5:00 pm - 6:00 pm
Homework
- Continue with Monster program.
- Use java inheritance so Troll monster has specific behavior.
- When Troll monster receive an “earth” magic attack, reduce the attack by half.
- When Troll monster receive a “fire” magic attack, say that Troll is immune to fire magic attack.
- Use java inheritance so Minotaur monster has specific behavior.
- When Minotaur is attacked by range attack, specifically using “arrow” weapon type, reduce the attack by half.
- Read 2 sections from this article https://blog.hubspot.com/website/encapsulation-java#:~:text=The%20private%20modifier%20is%20the,class%2C%20but%20only%20by%20subclasses.
- What is Encapsulation in Java?
- Access modifier