-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathxavier_cruz_quiz.ts
76 lines (71 loc) · 2.1 KB
/
xavier_cruz_quiz.ts
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
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';
export class XavierCruzQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'xaviercruz';
}
makeQuizQuestions(): QuizQuestion[] {
return [
XavierCruzQuiz.makeQuestion0(),
XavierCruzQuiz.makeQuestion1(),
XavierCruzQuiz.makeQuestion2(),
XavierCruzQuiz.makeQuestion3(),
];
}
private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What programming language supports the "struct" data type?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'C'],
[AnswerChoice.B, 'PHP'],
[AnswerChoice.C, 'JSP'],
[AnswerChoice.D, 'HTML'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'What is another name for an app?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Program'],
[AnswerChoice.B, 'Field'],
[AnswerChoice.C, 'Record'],
[AnswerChoice.D, 'Library'],
]),
AnswerChoice.UNANSWERED,
); // Provide an answer.
}
private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'A virtual machine is an example of what?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Presentation'],
[AnswerChoice.B, 'Fabrication'],
[AnswerChoice.C, 'Deprecation'],
[AnswerChoice.D, 'Emulation'],
]),
AnswerChoice.UNANSWERED,
); // Provide an answer.
}
private static makeQuestion3(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
3,
'What data type closely resembles a queue?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'String'],
[AnswerChoice.B, 'Character'],
[AnswerChoice.C, 'Integer'],
[AnswerChoice.D, 'Array'],
]),
AnswerChoice.UNANSWERED,
); // Provide an answer.
}
}