-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTools.java
49 lines (44 loc) · 1.25 KB
/
Tools.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
/**
* This class represent a tool, which has a name, usage cost, and experience yield.
*/
public class Tools {
private String toolName;
private int usageCost;
private double expYield;
/**
* Creates a Tools object by supplying the name and usage cost
*
* @param toolName the name of the tool
* @param usageCost the objectcoin amount needed for the tool's usage
* @param expYield the experience yield of the tool upon usage
*/
public Tools(String toolName, int usageCost, double expYield) {
this.toolName = toolName;
this.usageCost = usageCost;
this.expYield = expYield;
}
/**
* A method that returns the name of the tool
*
* @return the name of tool
*/
public String getToolName() {
return this.toolName;
}
/**
* A method that returns the usage cost of the tool
*
* @return the objectcoin amount needed for the tool's usage
*/
public int getUsageCost() {
return this.usageCost;
}
/**
* A method that returns the experience yield of the tool upon usage
*
* @return the experience yield of the tool upon usage
*/
public double getExpYield() {
return expYield;
}
}