Skip to content

Commit 17cba68

Browse files
committed
item class
1 parent 7b83b6a commit 17cba68

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Item.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
public class Item {
2+
private Food food;
3+
private int count;
4+
private String description;
5+
6+
public Item(Food food, int count, String description) {
7+
this.food = food;
8+
this.count = count;
9+
this.description = description;
10+
}
11+
12+
public Item(Food food, int count) {
13+
this.food = food;
14+
this.count = count;
15+
this.description = "";
16+
}
17+
18+
public Food getFood() {
19+
return food;
20+
}
21+
22+
public int getCount() {
23+
return count;
24+
}
25+
26+
public String getDescription() {
27+
return description;
28+
}
29+
}

0 commit comments

Comments
 (0)