-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathanthony_mays_quiz.ts
41 lines (37 loc) · 1.17 KB
/
anthony_mays_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
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';
export class AnthonyMaysQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'anthonymays';
}
makeQuizQuestions(): QuizQuestion[] {
return [AnthonyMaysQuiz.makeQuestion0(), AnthonyMaysQuiz.makeQuestion1()];
}
private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is a multiple choice question?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'A question about agency'],
[AnswerChoice.B, 'The hardest kind of quiz question there is'],
[
AnswerChoice.C,
'A question that can be answered using one or more provided choices',
],
[AnswerChoice.D, 'Whatever you want it to be!'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
private static makeQuestion1(): QuizQuestion {
return new QuizQuestion(
1,
'What is a computer?',
'A machine that automatically transforms input into output.',
); // Provide an answer.
}
}