-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderInterface.java
More file actions
64 lines (59 loc) · 2.46 KB
/
OrderInterface.java
File metadata and controls
64 lines (59 loc) · 2.46 KB
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
public interface OrderInterface {
/**
*
* @param day the day of the week
* @return true if the day is a weekend day (Saturday or Sunday)
*/
public boolean isWeekend();
/**
* returns the beverage listed in the itemNo of the order, for example if
* itemNo is 0 this method will return the first beverage in the order
* Note: this method returns the shallow copy of the Beverage
*
* @return the beverage listed in the itemNo of the order or null if there
* is no item in the order
*
*/
public Beverage getBeverage(int itemNo);
/**
* adds coffee order to this order
* @param bevName beverage name
* @param size beverage size of type SIZE
* @param extraShot true if the coffee beverage has extra shot , false otherwise
* @param extraSyrup true if the coffee beverage has extra syrup , false otherwise
*/
public void addNewBeverage(
String bevName,
SIZE size,
boolean extraShot,
boolean extraSyrup);
/**
* adds alcohol order to this order
* @param bevName beverage name
* @param size beverage size
*/
public void addNewBeverage( String bevName,
SIZE size);
/**
* Adds the Smoothie beverage to this order
* @param bevName beverage name
* @param size beverage size
* @param numOfFruits number of fruits added
* @param addPRotien true if protein is added, false otherwise
*/
public void addNewBeverage( String bevName,
SIZE size,
int numOfFruits,
boolean addPRotien);
/**
* Calculates and returns the total amount for this order
* @return total amount for this order
*/
public double calcOrderTotal();
/**
* returns the number of beverages of same type in an order
* @param type the type of the beverage
* @return number of beverages of type type in this order
*/
public int findNumOfBeveType(TYPE type);
}