forked from jcrouser/CSC120-FinalProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
44 lines (36 loc) · 828 Bytes
/
Copy pathItem.java
File metadata and controls
44 lines (36 loc) · 828 Bytes
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
/**
* Represents a Item
*/
public class Item {
private String name;
private String description;
private int buyAmount;
/**
* Creates a Item that has a name, description, and buyAmount
*/
public Item(String n, String d, int b) {
name = n;
description = d;
buyAmount = b;
}
/* Accessors */
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public int getBuyAmount() {
return this.buyAmount;
}
public int getSellAmount() {
int sellAmount = buyAmount / 2;
return sellAmount;
}
/**
* Main method for testing
* @param args[] An empty array of Strings
*/
public static void main(String[] args) {
}
}