-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShopCLI.java
More file actions
35 lines (28 loc) · 797 Bytes
/
ShopCLI.java
File metadata and controls
35 lines (28 loc) · 797 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
import java.util.InputMismatchException;
import java.util.Scanner;
public class ShopCLI {
private static Shop shop;
private static int decision;
private static boolean quit = false;
public static void main(String[] args) {
while (quit != true) {
Scanner in = new Scanner(System.in);
System.out.println(" Welcome to Tesbury's");
System.out.println("**********************");
System.out.println("1. Add Customer\n2. To report on positions\n3. Quit");
System.out.println("Select option [1,2] : ");
try {
int decision = in.nextInt();
} catch (InputMismatchException ime) {
System.out.println("Please enter either 1 or 2");
}
shop = new Shop();
switch (decision) {
case 1:
shop.addCustomerToBestQueue();
break;
case 2:
}
}
}
}