|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class EvanPhilakhongQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'evanphilakhong'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + EvanPhilakhongQuiz.makeQuestion0(), |
| 16 | + EvanPhilakhongQuiz.makeQuestion1(), |
| 17 | + EvanPhilakhongQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'What is a CPU?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'Computer Power Unit'], |
| 27 | + [AnswerChoice.B, 'Complex Processing Unit'], |
| 28 | + [AnswerChoice.C, 'Central Processing Unit'], |
| 29 | + [AnswerChoice.D, 'Coding Processor Unit'], |
| 30 | + ]), |
| 31 | + AnswerChoice.UNANSWERED, // replace UNANSWERED with correct answer |
| 32 | + ); |
| 33 | + } |
| 34 | + |
| 35 | + private static makeQuestion1(): QuizQuestion { |
| 36 | + return new MultipleChoiceQuizQuestion( |
| 37 | + 1, |
| 38 | + 'What is a GPU?', |
| 39 | + new Map<AnswerChoice, string>([ |
| 40 | + [AnswerChoice.A, 'Graphics Processing Unit'], |
| 41 | + [AnswerChoice.B, 'Gaming Power Unit'], |
| 42 | + [AnswerChoice.C, 'Graphical Programming Unit'], |
| 43 | + [AnswerChoice.D, 'Gaming Processor Unit'], |
| 44 | + ]), |
| 45 | + AnswerChoice.UNANSWERED, // replace UNANSWERED with correct answer |
| 46 | + ); |
| 47 | + } |
| 48 | + |
| 49 | + private static makeQuestion2(): QuizQuestion { |
| 50 | + return new MultipleChoiceQuizQuestion( |
| 51 | + 2, |
| 52 | + 'What is a PSU?', |
| 53 | + new Map<AnswerChoice, string>([ |
| 54 | + [AnswerChoice.A, 'Programming Super Unit'], |
| 55 | + [AnswerChoice.B, 'Power Supply Unit'], |
| 56 | + [AnswerChoice.C, 'Power Supplier Unit'], |
| 57 | + [AnswerChoice.D, 'Power Storing Unit'], |
| 58 | + ]), |
| 59 | + AnswerChoice.UNANSWERED, // repleace UNANSWERED with correct answer |
| 60 | + ); |
| 61 | + } |
| 62 | +} |
0 commit comments