Ultimate Warrior (UW) is a first-person shooter game. There are two types of characters: warriors and monsters. There are three types of monsters: dragons, robots, and zombies. More monsters may be added in the future. The location of a character is a room in a maze which consists of a grid of rooms:
North
|
|
|
|
|
|
|
|
|
M |
M M |
|
|
|
|
|
W |
|
|
|
|
|
M M M |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each room has a neighboring room the north, south, east, and west. (The maze wraps.)
A warrior can move to a neighboring room.
Monsters attack a warrior when she enters a room. When a warrior is attacked her health, which was initially 100, is decremented. A warrior dies when her health reaches 0.
Monsters have different attack strategies. These include biting, stomping, and flaming. Other strategies may be added in the future.
A warrior carries a weapon. Rifles, pistols, and bazookas are weapons. Other weapons may be added in the future. If a weapon has ammunition, it can be fired. A Warrior shoots monsters. When a monster is hit, its health, which was initially 100, is decremented. A monster dies when her health reaches 0.
Faithfully translate the above description of UW into a UML
class diagram. Include attributes and operations where appropriate. Your model
should be easy for programmers to implement.