|
@@ -4,44 +4,58 @@ public class Console {
|
4
|
4
|
|
5
|
5
|
private static Scanner scanner = new Scanner(System.in);
|
6
|
6
|
|
7
|
|
- public static String mainMenu() {
|
8
|
|
- System.out.println("What would you like to do?" +
|
|
7
|
+ public static String printMainMenu() {
|
|
8
|
+ System.out.println("\nWhat would you like to do?" +
|
9
|
9
|
"\n> GET all users" +
|
10
|
10
|
"\n> ADD your information" +
|
11
|
11
|
"\n> SEND a message" +
|
12
|
12
|
"\n> SEE all messages" +
|
13
|
13
|
"\n> QUIT");
|
14
|
|
- String option = scanner.nextLine().toUpperCase();
|
15
|
|
- return option;
|
|
14
|
+ return scanner.nextLine().toUpperCase();
|
|
15
|
+ }
|
|
16
|
+
|
|
17
|
+ public static String printSendMenu() {
|
|
18
|
+ System.out.println("\nWhat type of message do you want to send?" +
|
|
19
|
+ "\n> GLOBAL message to everyone" +
|
|
20
|
+ "\n> DIRECT message to a specific user");
|
|
21
|
+ return scanner.nextLine().toUpperCase();
|
16
|
22
|
}
|
17
|
23
|
|
18
|
24
|
public static String getName() {
|
19
|
|
- System.out.println("Please input your name: ");
|
|
25
|
+ System.out.println("\nPlease input your name: ");
|
20
|
26
|
String name = scanner.nextLine();
|
21
|
27
|
return name;
|
22
|
28
|
}
|
23
|
29
|
|
24
|
30
|
public static String getGithub() {
|
25
|
|
- System.out.println("Please input your Github ID: ");
|
|
31
|
+ System.out.println("\nPlease input your Github ID: ");
|
26
|
32
|
String github = scanner.nextLine();
|
27
|
33
|
return github;
|
28
|
34
|
}
|
29
|
35
|
|
30
|
36
|
public static String getFromID() {
|
31
|
|
- System.out.println("Please input your ID: ");
|
|
37
|
+ System.out.println("\nPlease input your ID: ");
|
32
|
38
|
String github = scanner.nextLine();
|
33
|
39
|
return github;
|
34
|
40
|
}
|
35
|
41
|
|
36
|
42
|
public static String getToID() {
|
37
|
|
- System.out.println("Please input the receiver's ID: ");
|
|
43
|
+ System.out.println("\nPlease input the receiver's ID: ");
|
38
|
44
|
String github = scanner.nextLine();
|
39
|
45
|
return github;
|
40
|
46
|
}
|
41
|
47
|
|
42
|
48
|
public static String getMessage() {
|
43
|
|
- System.out.println("Please input your message: ");
|
|
49
|
+ System.out.println("\nPlease input your message: ");
|
44
|
50
|
String github = scanner.nextLine();
|
45
|
51
|
return github;
|
46
|
52
|
}
|
|
53
|
+
|
|
54
|
+ public static void printError(){
|
|
55
|
+ System.out.println("\nAn error has occurred.");
|
|
56
|
+ }
|
|
57
|
+
|
|
58
|
+ public static void printSuccess(String choice) {
|
|
59
|
+ System.out.println("\n" + choice + " success!");
|
|
60
|
+ }
|
47
|
61
|
}
|