Skip to content

Commit 158c79d

Browse files
committed
Created new branch
1 parent aa65ed1 commit 158c79d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class AnthonyMaysQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'anthonymays';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [AnthonyMaysQuiz.makeQuestion0(), AnthonyMaysQuiz.makeQuestion1()];
15+
}
16+
17+
private static makeQuestion0(): QuizQuestion {
18+
return new MultipleChoiceQuizQuestion(
19+
0,
20+
'What is a multiple choice question?',
21+
new Map<AnswerChoice, string>([
22+
[AnswerChoice.A, 'A question about agency'],
23+
[AnswerChoice.B, 'The hardest kind of quiz question there is'],
24+
[
25+
AnswerChoice.C,
26+
'A question that can be answered using one or more provided choices',
27+
],
28+
[AnswerChoice.D, 'Whatever you want it to be!'],
29+
]),
30+
AnswerChoice.UNANSWERED,
31+
); // Replace `UNANSWERED` with the correct answer.
32+
}
33+
34+
private static makeQuestion1(): QuizQuestion {
35+
return new QuizQuestion(
36+
1,
37+
'What is a computer?',
38+
'A machine that automatically transforms input into output.',
39+
); // Provide an answer.
40+
}
41+
}

0 commit comments

Comments
 (0)