-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.java
More file actions
104 lines (90 loc) · 3.13 KB
/
Menu.java
File metadata and controls
104 lines (90 loc) · 3.13 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.company;
import java.util.Scanner;
/**
* Menu class currently only has static methods to prompt to standard output information about a Contact like name,etc
* @author Michael LaRussa
* @since 2/15/2021
*/
class Menu {
static Scanner input = new Scanner(System.in);
/**
* Generates a standard Menu prompt, and then takes user input and returns it.
*/
public static String mainMenu() {
System.out.println("-----------------------------------------");
System.out.println("Please enter your menu selection:");
System.out.println("(a) Loading from file");
System.out.println("(b) Addition");
System.out.println("(c) Removal");
System.out.println("(d) Find");
System.out.println("(e) Listing");
System.out.println("(f) Quit");
System.out.println("-----------------------------------------");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the First Name to be entered, and then takes user input and returns it.
*/
public static String prompt_FirstName() {
System.out.println("First Name:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the Last Name to be entered, and then takes user input and returns it.
*/
public static String prompt_LastName() {
System.out.println("Last Name:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the Street to be entered, and then takes user input and returns it.
*/
public static String prompt_Street() {
System.out.println("Street:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the City to be entered, and then takes user input and returns it.
*/
public static String prompt_City() {
System.out.println("City:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the State to be entered, and then takes user input and returns it.
*/
public static String prompt_State() {
System.out.println("State:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the Zip to be entered, and then takes user input and returns it.
*/
public static Integer prompt_Zip() {
System.out.println("Zip:");
Integer in = Integer.parseInt(input.nextLine());
return in;
}
/**
* Generates a standard output prompt for the Telephone to be entered, and then takes user input and returns it.
*/
public static String prompt_Telephone() {
System.out.println("Telephone:");
String in = input.nextLine();
return in;
}
/**
* Generates a standard output prompt for the Email to be entered, and then takes user input and returns it.
*/
public static String prompt_Email() {
System.out.println("Email:");
String in = input.nextLine();
return in;
}
}