This repository was archived by the owner on Jan 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuiz2.java
More file actions
70 lines (55 loc) · 1.49 KB
/
Quiz2.java
File metadata and controls
70 lines (55 loc) · 1.49 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
package cs1120;
//main method
public class Quiz {
// two static member variables
static int nQuestions = 0;
static int nCorrect = 0;
public static void main(String[] args) {
MultipleChoiceQuestion question = new MultipleChoiceQuestion(
"Which of these countries was NEVER part of the British Empire??",
"New Zealand",
"Kenya",
"Thailand",
"Ireland",
"Moscow",
"a");
MultipleChoiceQuestion question2 = new MultipleChoiceQuestion(
"Which of these U.S. states does NOT border Canada?",
"Alaska",
"Maine",
"Indiana",
"Minnesota",
"Washington",
"d");
MultipleChoiceQuestion question3 = new MultipleChoiceQuestion(
"Which of these countries was NOT a part of the Soviet Union?",
"Ukraine",
"Georgia",
"Usbekistan",
"Poland",
"Belarus",
"d");
MultipleChoiceQuestion question4 = new MultipleChoiceQuestion(
"Which of these cities is NOT a national capital?",
"Sydney",
"Bankgkok",
"New York",
"Prague",
"Cairo",
"a");
MultipleChoiceQuestion question5 = new MultipleChoiceQuestion(
"Which of these cities DOESN'T border the Mediterranean Sea??",
"Barcelona",
"Alexandria",
"Monaco",
"Prague",
"Lisbon",
"e");
question.check();
question2.check();
question3.check();
question4.check();
question5.check();
MultipleChoiceQuestion.showResults();
}
}