Creature class assignment
From WLCS
Purpose
- The purpose of this class is to encapsulate all the attributes and methods of a single Creature object
Attributes
The Creature class should use variables to represent the following attributes:
- hit points (int): the amount of damage a creature can take before it dies. A creature's hit points are reduced when an opponent scores a hit: when the warrior successfully attacks the monster, it decreases the monster's hit points, and if the monster takes a bite out of the warrior, the warrior's hit points go down. If hit points reach or drops below zero, the creature dies.
- strength (int): the maximum damage a creature can inflict. The strength represents the maximum number of hit points that will be deducted from the opponent if the creature scores a hit.
- skill (int): the likelihood of a creature scoring a hit. This is an integer between 0 and 25. The higher the skill, the more likely the creature is to score a hit.
- armor class (int): the armor class or AC of a creature represents how hard it is to damage. It is an integer between 0 and 20. The higher the AC, the less likely an opponent is to score a hit.
- name (String): the name of the creature (e.g., "Frodo" or "Aaron Bloomfield").
- type (String): a word or phrase describing the race or class of the creature (e.g., "hobbit" or "mighty warrior").
- pronoun (String): the appropriate possessive pronoun to use for this creature (e.g., "his", "her", "its").
- weapon (Weapon): a reference to the Weapon object wielded by the creature.