-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathApp.java
More file actions
59 lines (40 loc) · 1.51 KB
/
App.java
File metadata and controls
59 lines (40 loc) · 1.51 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
package io;
import services.HockeyStickService;
import java.util.Scanner;
public class App {
private HockeyStickService stickService = new HockeyStickService();
public static void main(String... args) {
App application = new App();
application.init();
}
public void init() {
Console.printWelcome();
}
public String userInput() {
Integer opt1 = 0;
String opt2 = "";
String opt3 = "";
Integer opt4 = 0;
Integer opt5 = 0;
Double opt6 = 0.0;
while (addMore = true) {
System.out.println("What do you wish to add to inventory? Press 1 for Stick 2 for Skate");
Scanner scanner = new Scanner(String.valueOf(input));
System.out.println();
System.out.println("Product Name?");
opt2 = String.valueOf(scanner.hasNextInt());
System.out.println("Product Brand?");
opt3 = String.valueOf(scanner.hasNextInt());
System.out.println("Product Size");
opt4 = Integer.valueOf(String.valueOf(scanner.hasNextInt()));
System.out.println("Product Price");
opt6 = Double.valueOf(String.valueOf(scanner.hasNextInt()));
System.out.println("How many would you like to add?");
opt5 = Integer.valueOf(String.valueOf(scanner.hasNextInt()));
System.out.println("Products I.D.?");
if (input = 1) {
HockeyStickService.create(o)
}
}
}
}