-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.java
More file actions
61 lines (56 loc) · 2.08 KB
/
Copy pathApp.java
File metadata and controls
61 lines (56 loc) · 2.08 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
import java.util.Scanner;
public class App {
public static void main(String[] args) {
NameMaster nameMaster = new NameMaster();
Scanner scanner = new Scanner(System.in);
while (true) {
System.out.println("1. Get your full name back.");
System.out.println("2. Get the length of your first name back.");
System.out.println("3. Enter the correct password.");
System.out.println("4. Only print your last name.");
System.out.println("5. Get your initials only.");
System.out.println("6. Get the word count from your saying.");
System.out.println("7. Get your phrase in reverse.");
System.out.println("8. Get the number of vowels and consonants in your phrase.");
System.out.println("9. Game: Guess the correct word.");
System.out.println("10. Cipher your phrase using Caesar Cipher.");
System.out.println("11. Quit.");
System.out.print("Enter your option: ");
int option = Integer.valueOf(scanner.nextLine());
if (option == 1) {
nameMaster.getFullName();
}
if (option == 2) {
nameMaster.getNameLength();
}
if (option == 3) {
nameMaster.passwordChecker();
}
if (option == 4) {
nameMaster.onlyLastName();
}
if (option == 5) {
nameMaster.onlyInitials();
}
if (option == 6) {
nameMaster.sayingWordCount();
}
if (option == 7) {
nameMaster.inReverse();
}
if (option == 8) {
nameMaster.vowelsAndConsonantsChecker();
}
if (option == 9) {
nameMaster.hangman();
}
if (option == 10) {
nameMaster.caesarCipher();
}
if (option == 11) {
System.out.println("Bye.");
break;
}
}
}
}