-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPolice.java
More file actions
executable file
·86 lines (77 loc) · 1.96 KB
/
Police.java
File metadata and controls
executable file
·86 lines (77 loc) · 1.96 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
* This is the police class that generates a new police officer for the game.
* These characters are NPC that will be used to hinder the players decision of attacking
* something, whether it causes no damage or not.
*
* The characters movement shall be random.
*
* @author
* @version
*/
public class Police
{
// instance variables - replace the example below with your own
private String police;
private int policeDamage;
private String policeReaction;
/**
* Constructor for objects of class RandomPlayer
*/
public Police(String police, int policeDamage, String policeReaction)
{
this.police = police;
this.policeDamage = policeDamage;
this.policeReaction = policeReaction;
}
/**
* @return the string for the policemand name
*/
public String getPoliceName()
{
return police;
}
/**
* @return This returns the int value for the polices damage.
*/
public int getPoliceDamage()
{
return policeDamage;
}
/**
* @return Returns the String for the policeman reaction
*/
public String getPoliceReaction()
{
return policeReaction;
}
/**
* @param sets up new string for the name;
*/
public void setPolice(String newPolice)
{
police = newPolice;
}
/**
* @param sets up a new int value for the damage
*/
public void setPoliceDamage(int newpoliceDamage)
{
policeDamage = newpoliceDamage;
}
/**
* @param sets up new string for the reaction
*/
public void setPoliceReaction(String newpoliceReaction)
{
policeReaction = newpoliceReaction;
}
/**
* @param Prints the value of all the objects specified above.
*/
public void printPolice()
{
System.out.println(police);
System.out.println(policeDamage);
System.out.println(policeReaction);
}
}