-
Notifications
You must be signed in to change notification settings - Fork 3
/
BaseMenu.java
75 lines (60 loc) · 1.82 KB
/
BaseMenu.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package CZ2002_Assignment;
import java.util.ArrayList;
// List of predefined menu items
/**
* Base menu, a defined list of promotions and menu items to use
*/
public class BaseMenu {
private ArrayList<MenuItem> baseItemList = new ArrayList<MenuItem> ();
private ArrayList<Promotion> basePromoList = new ArrayList<Promotion> ();
MenuItem m1 = new MenuItem("Hand Tossed Salad", "strawberries, dried cranberries, raisins, pineapple" , 5.00, MenuCategory.SIDES);
MenuItem m2 = new MenuItem("Caesar Salad", "parmesan cheese, lemon juice" , 8.00, MenuCategory.SIDES);
MenuItem m3 = new MenuItem("Fresh Juice", "orange / apple / watermelon" , 2.00, MenuCategory.DRINKS);
MenuItem m4 = new MenuItem("Roast Beef with Mushroom Sauce", "Beef + Mushroom" , 17.00, MenuCategory.MAINS);
/**
* Creates the base for menu items
* @return return the list created
*/
public ArrayList<MenuItem> CreateBaseItemList() {
baseItemList.add(m1);
baseItemList.add(m2);
baseItemList.add(m3);
baseItemList.add(m4);
return baseItemList;
}
/**
* Creates the base for promotion items
* @return return the list created
*/
public ArrayList<Promotion> CreateBasePromoList() {
return basePromoList;
}
/**
* Getter for base menu list
* @return return the list reference of menu items
*/
public ArrayList<MenuItem> getBaseItemList() {
return baseItemList;
}
/**
* Getter for base promotion list
* @return return the list reference of promotion
*/
public ArrayList<Promotion> getBasePromoList() {
return basePromoList;
}
/**
* Getter for size of base menu list
* @return return the size of menu item list
*/
public int baseMenuSize() {
return baseItemList.size();
}
/**
* Getter for base promo list
* @return size of base promo list
*/
public int basePromoSize() {
return basePromoList.size();
}
}