Skip to content

alisonps/hfj-chapter9

Repository files navigation

Creates Orc and Troll classes that implement a Monster interface with takeDamage(int amount), String name(), and int currentHitpoints() methods. Creates instances of both classes and stores them in an ArrayList. Iterates through the list and makes each monster take 10 points of damage. After all of the monsters have been damaged, the program reports the name and current hit points of all monsters. Orcs are named “Orc” and have 20 initial hitpoints Trolls are named “Troll”, have 40 hit points and only take half damage

About

HFJ Chapter 7, 8 & 9 for TW

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages