Today We Did
- Reviewed Java Quiz
- Started MonsterInheritance project
- Explained final strings
- Explained nextInt() vs nextLine() + parseInt()
- Set up run() method
- Started addNewMonster() and Monster class
Homework
Continue working on MonsterInheritance:
- Finish the Monster class:
- Create getter and setter methods
- Create a public method called
heal
with one integer parameter hp
that heals the monster by the specified health points. Doesn’t return any value.
- Finish
addNewMonster()
:- Create a new Monster and store it in a HashMap
- Create
listAllMonsters()
(selection 2):- Print out all monsters in the following format:
- – {Monster species}: {Monster health} HP
If you have any questions, please email me at williamsmith@ayclogic.com.