-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItem.java
61 lines (51 loc) · 1.16 KB
/
Item.java
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
package realzork;
public class Item {
private String name;
private int weight;
private String description;
public boolean taken;
public Item(String name, int weight, String desc)
{
this.name = name;
this.weight = weight;
this.description = desc;
taken = false;
}
public Item(String name, String desc)
{
this(name, 0, desc);
}
public String toString(Item item) {
return item.getName();
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the weight
*/
public int getWeight() {
return weight;
}
/**
* @param weight the weight to set
*/
public void setWeight(int weight) {
this.weight = weight;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
}