We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fc12d9 commit 7b83b6aCopy full SHA for 7b83b6a
1 file changed
Food.java
@@ -0,0 +1,27 @@
1
+import java.util.Vector;
2
+
3
+public class Food {
4
+ private String name;
5
+ private int price;
6
7
+ private static Vector<Food> menu = new Vector<Food>();
8
9
+ public Food(String name, int price) {
10
+ this.name = name;
11
+ this.price = price;
12
13
+ menu.add(this);
14
+ }
15
16
+ public String getName() {
17
+ return name;
18
19
20
+ public int getPrice() {
21
+ return price;
22
23
24
+ public static Vector<Food> getMenu() {
25
+ return menu;
26
27
+}
0 commit comments