-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdminState.java
29 lines (21 loc) · 939 Bytes
/
AdminState.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
import java.util.List;
/**
* Interface to provide classes with admin state methods.
* These methods can only be used when the admin has logged into the machine.
*/
public interface AdminState extends State{
void logout() throws AdminPrivilegeException;
// Take the money out of the machine
List<Coin> withdrawCoins() throws AdminPrivilegeException;
// Add money to the machine
void depositCoins(Integer amount) throws AdminPrivilegeException;
// Stocks an item
// throws an exception if already full
void adminRefillProduct(Product product) throws AdminPrivilegeException;
// Stocks all items
// throws an exception if already full
void adminRefillAllProduct() throws AdminPrivilegeException;
String printAdminCoinInfo() throws AdminPrivilegeException;
String printAdminProductInfo() throws AdminPrivilegeException;
void printAdminInfo() throws AdminPrivilegeException;
}