« All Events
10 AM – Intro To Java – Gamas
November 13, 2021 @ 10:00 am - 11:00 am
Today We Do
- We reviewed quiz result.
Homework
- Create a new Java Project (File > New Project) call this project “MonsterInheritance“.
- Inside this new project, create a new Java file/class: Monster.java
- Inside this new class, create 2 attributes: String species and int health.
- Create a new Java class: MonsterSystem.java
- Inside MonsterSystem, create a Map monsterMap;
- Inside MonsterSystem, add a method initializeMonster(). Inside this method, user will add monster’s species as the key and Monster class as the value.
- Monster class with species “dragon” and health – 100.
- Monster class with species “troll” and health – 50.
- Monster class with species “water golem” and health – 30.