-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.java
More file actions
39 lines (35 loc) · 736 Bytes
/
Project.java
File metadata and controls
39 lines (35 loc) · 736 Bytes
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
import java.util.*;
public class Project
{
public static void main(String[] args)
{
Scanner stdin = new Scanner(System.in);
Inventory inv = Inventory.getInstance();
while(true) {
int selected = -1;
displayMenu();
System.out.print("Choice: ");
selected = Helpers.extractUnsignedInt(stdin.nextLine(), 3);
switch (selected) {
case 0:
Customer.checkout();
break;
case 1:
Restock.restock();
break;
case 2:
Manager.menu();
break;
case 3:
System.exit(0);
}
}
}
static void displayMenu()
{
System.out.println("0: Start Checkout");
System.out.println("1: Restock Inventory");
System.out.println("2: Manager Menu");
System.out.println("3: Exit");
}
}