-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
30 lines (26 loc) · 868 Bytes
/
Main.java
File metadata and controls
30 lines (26 loc) · 868 Bytes
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
public class Main {
public static void main(String[] args) {
Quiz quiz = new Quiz();
// Adding sample questions
quiz.addQuestion(new Question(
"What is the capital of France?",
new String[]{"London", "Berlin", "Paris", "Madrid"},
2, // index of correct answer (Paris)
10 // time limit in seconds
));
quiz.addQuestion(new Question(
"Which planet is known as the Red Planet?",
new String[]{"Venus", "Mars", "Jupiter", "Saturn"},
1, // Mars
15
));
quiz.addQuestion(new Question(
"What is 2 + 2 * 2?",
new String[]{"6", "8", "4", "10"},
0, // 6
10
));
// Start the quiz
quiz.start();
}
}