-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonster.java
More file actions
57 lines (51 loc) · 1.01 KB
/
Monster.java
File metadata and controls
57 lines (51 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
*
*/
/**
* class: Monster
*
* course: ITEC 3150 Spring 2015
*
* written: April 1, 2015
*
* @author Alejandro Guzman
* @version 1.0
*
*
* This is a template for a monster. This class extends the character
* class.
*
*
*/
public class Monster extends Character {
/**
* This constructor follows the super class constructor. It assigns a name
* and makes the healthPoints to 100 and randomly assigns a number between 7
* and 15 to the attackPoints.
*
* @param name
*/
public Monster(String name) {
super(name);
}
/**
* This constructor follows the super class constructor. It assigns a name,
* health, and attack.
*
* @param name
* @param healthPoints
* @param attackPoints
*/
public Monster(String name, int healthPoints, int attackPoints) {
super(name, healthPoints, attackPoints);
}
/**
* toString
*
* @return A string representing of this monster.
*/
@Override
public String toString() {
return "Monster " + super.toString();
}
}