|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class ShawnDunsmoreQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'shawndunsmore'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + ShawnDunsmoreQuiz.makeQuestion0(), |
| 16 | + ShawnDunsmoreQuiz.makeQuestion1(), |
| 17 | + ShawnDunsmoreQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'What is Davids Favorite?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'Idc'], |
| 27 | + [AnswerChoice.B, 'Blue'], |
| 28 | + [AnswerChoice.C, 'Black'], |
| 29 | + [AnswerChoice.D, 'Whatever you think it is.'], |
| 30 | + ]), |
| 31 | + AnswerChoice.UNANSWERED, |
| 32 | + ); // Replace `UNANSWERED` with the correct answer. |
| 33 | + } |
| 34 | + |
| 35 | + private static makeQuestion1(): QuizQuestion { |
| 36 | + return new QuizQuestion( |
| 37 | + 1, |
| 38 | + 'What is Jordan famous for?', |
| 39 | + 'Pickle ball champion', |
| 40 | + ); // Provide an answer. |
| 41 | + } |
| 42 | + |
| 43 | + private static makeQuestion2(): QuizQuestion { |
| 44 | + return new MultipleChoiceQuizQuestion( |
| 45 | + 2, |
| 46 | + 'How mnay states are there?', |
| 47 | + new Map<AnswerChoice, string>([ |
| 48 | + [AnswerChoice.A, '50'], |
| 49 | + [AnswerChoice.B, '35'], |
| 50 | + [AnswerChoice.C, '20'], |
| 51 | + [AnswerChoice.D, '65'], |
| 52 | + ]), |
| 53 | + AnswerChoice.UNANSWERED, |
| 54 | + ); // Replace `UNANSWERED` with the correct answer. |
| 55 | + } |
| 56 | +} |
0 commit comments