-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.code
207 lines (196 loc) · 8.79 KB
/
.code
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
package Reading;
import java.util.Scanner;
// Here are the correct answers to each multiple choice question.
public class Trial {
static String multiChoice1[] = {"B"};
static String multiChoice2[] = {"A"};
static String multiChoice3[] = {"D"};
static String multiChoice4[] = {"A"};
static String multiChoice5[] = {"C"};
static int scorePro;
static int score;
public static void main(String[] args) {
test();
}
public static void Score(){
// Here is where the code will add up the answers into a score at the end of the quiz.
}
public static void test(){
String userSelect1 = multiChoice1[0], userSelect2 = multiChoice2[0], userSelect3 = multiChoice3[0], userSelect4 = multiChoice4[0], userSelect5 = multiChoice5[0];
Scanner input = new Scanner(System.in);
if(userSelect1.equals(multiChoice1[0])){
System.out.println("Who has the biggest technology industry in the world?");
System.out.println("A. United States");
System.out.println("B. China");
System.out.println("C. India");
System.out.println("D. England");
System.out.println();
System.out.print("Your answer: ");
String uSelect1 = input.next();
switch (uSelect1.toUpperCase()){
case "A":
uSelect1 = "United States";
System.out.println("Incorrect!\n\n");
break;
case "B":
uSelect1 = "China";
System.out.println("Correct!\n\n");
scorePro++;
score++;
break;
case "C":
uSelect1 = "India";
System.out.println("Incorrect!\n\n");
break;
case "D":
uSelect1 = "England";
System.out.println("Incorrect!\n\n");
break;
default:
uSelect1 = "Incorrect, choice.\n\n";
System.out.println("Please select an option from the provided options!!!");
test();
}
if(userSelect2.equals(multiChoice2[0])){
System.out.println("Where is the biggest city in the world?");
System.out.println("A. United States");
System.out.println("B. China");
System.out.println("C. India");
System.out.println("D. England");
System.out.println();
System.out.print("Your answer: ");
String uSelect2 = input.next();
switch (uSelect2.toUpperCase()){
case "A":
uSelect2 = "United States";
System.out.println("Incorrect!\n\n");
break;
case "B":
uSelect2 = "China";
System.out.println("Inorrect!\n\n");
break;
case "C":
uSelect2 = "India";
System.out.println("Correct!\n\n");
scorePro++;
score++;
break;
case "D":
uSelect2 = "England";
System.out.println("Incorrect!\n\n");
break;
default:
uSelect2 = "Incorrect, choice.\n\n";
System.out.println("Please select an option from the provided options!!!");
test();
}
if(userSelect3.equals(multiChoice3[0])){
System.out.println("Who are our allies?");
System.out.println("A. United States");
System.out.println("B. China");
System.out.println("C. India");
System.out.println("D. England");
System.out.println();
System.out.print("Your answer: ");
String uSelect3 = input.next();
switch (uSelect3.toUpperCase()){
case "A":
uSelect3 = "United States";
System.out.println("Incorrect!\n\n");
break;
case "B":
uSelect3 = "China";
System.out.println("Incorrect!\n\n");
break;
case "C":
uSelect3 = "India";
System.out.println("Incorrect!\n\n");
break;
case "D":
uSelect3 = "England";
System.out.println("Correct!\n\n");
scorePro++;
score++;
break;
default:
uSelect3 = "Incorrect, choice.\n\n";
System.out.println("Please select an option from the provided options!!!");
test();
}
if(userSelect4.equals(multiChoice4[0])){
System.out.println("Which country have the most people?");
System.out.println("A. United States");
System.out.println("B. China");
System.out.println("C. India");
System.out.println("D. England");
System.out.println();
System.out.print("Your answer: ");
String uSelect4 = input.next();
switch (uSelect4.toUpperCase()){
case "A":
uSelect4 = "United States";
System.out.println("Correct!\n\n");
scorePro++;
score++;
break;
case "B":
uSelect4 = "China";
System.out.println("Incorrect!\n\n");
break;
case "C":
uSelect4 = "India";
System.out.println("Incorrect!\n\n");
break;
case "D":
uSelect4 = "England";
System.out.println("Incorrect!\n\n");
break;
default:
uSelect4 = "Incorrect, choice.\n\n";
System.out.println("Please select an option from the provided options!!!");
test();
}
if(userSelect5.equals(multiChoice5[0])){
System.out.println("Which country has the hardest language to speak?");
System.out.println("A. United States");
System.out.println("B. China");
System.out.println("C. India");
System.out.println("D. England");
System.out.println();
System.out.print("Your answer: ");
String uSelect5 = input.next();
switch (uSelect5.toUpperCase()){
case "A":
uSelect5 = "United States";
System.out.println("Correct!\n\n");
break;
case "B":
uSelect5 = "China";
System.out.println("Correct!\n\n");
scorePro++;
score++;
break;
case "C":
uSelect5 = "India";
System.out.println("Incorrect!\n\n");
break;
case "D":
uSelect5 = "England";
System.out.println("Incorrect!\n\n");
break;
default:
uSelect5 = "Incorrect, choice.\n\n";
System.out.println("Please select an option from the provided options!!!");
test();
}
if(scorePro == 100){
System.out.println("Great job! You made a perfect score.");
}
else if(scorePro == 90){
System.out.println("You missed one but still great job.");
}
else if(scorePro == 80){
System.out.println("You missed more than two questions. You are capable of doing a better job");
}
}
}}}}}}