-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEquippable.java
More file actions
41 lines (40 loc) · 1.13 KB
/
Equippable.java
File metadata and controls
41 lines (40 loc) · 1.13 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
package Assignment4;
public class Equippable extends Item {
private String perk, material;
private double age;
public Equippable(String name, double weight, double value, double ID, double Durability, String material, double age, String perk) {
super(name, weight, value, ID, Durability);
this.perk = perk;
this.material = material;
this.age = age;
}
public String getPerk() {
return perk;
}
public void setPerk(String perk) {
this.perk = perk;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public double getAge() {
return age;
}
public void setAge(double age) {
this.age = age;
}
@Override
public String toString() {
return ("Name: | "+this.getName()+
" | ID: "+ this.getID() +
" | Weight: "+ this.getWeight()+
" | Value: " + this.getValue()+
" | Durability: " + this.getDurability()+
" | Made of: " + this.getMaterial()+
" | Age: " + this.getAge() +
" | The Perk: " + this.getPerk() + " |");
}
}