|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class KarensQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'karenalabi'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + KarensQuiz.makeQuestion0(), |
| 16 | + KarensQuiz.makeQuestion1(), |
| 17 | + KarensQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'What does GPU stand for?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'Graphical Processing Unit'], |
| 27 | + [AnswerChoice.B, 'Gaming Processing Unit'], |
| 28 | + [AnswerChoice.C, 'General Preserving Unit'], |
| 29 | + [AnswerChoice.D, 'George P. Underwood'], |
| 30 | + ]), |
| 31 | + AnswerChoice.UNANSWERED, |
| 32 | + ); // Replace `UNANSWERED` with the correct answer. |
| 33 | + } |
| 34 | + |
| 35 | + private static makeQuestion1(): QuizQuestion { |
| 36 | + return new MultipleChoiceQuizQuestion( |
| 37 | + 1, |
| 38 | + 'Which of the following best describes a computer?', |
| 39 | + new Map<AnswerChoice, string>([ |
| 40 | + [AnswerChoice.A, 'Karen from Spongebob'], |
| 41 | + [ |
| 42 | + AnswerChoice.B, |
| 43 | + 'A machine that automatically transforms input data into output data using pre-programmed instructions', |
| 44 | + ], |
| 45 | + [ |
| 46 | + AnswerChoice.C, |
| 47 | + 'A high-tech calculator that only performs basic arithmetic operations like addition and subtraction, making it useful only for solving math problems', |
| 48 | + ], |
| 49 | + [ |
| 50 | + AnswerChoice.D, |
| 51 | + 'A microwave with a keyboard that heats up data instead of food', |
| 52 | + ], |
| 53 | + ]), |
| 54 | + AnswerChoice.UNANSWERED, |
| 55 | + ); // Provide the correct answer. |
| 56 | + } |
| 57 | + |
| 58 | + private static makeQuestion2(): QuizQuestion { |
| 59 | + return new MultipleChoiceQuizQuestion( |
| 60 | + 2, |
| 61 | + 'What is the motherboard?', |
| 62 | + new Map<AnswerChoice, string>([ |
| 63 | + [ |
| 64 | + AnswerChoice.A, |
| 65 | + 'A big chip that controls how fast your computer runs.', |
| 66 | + ], |
| 67 | + [ |
| 68 | + AnswerChoice.B, |
| 69 | + 'The part of the computer that generates electricity to power all the other components.', |
| 70 | + ], |
| 71 | + [ |
| 72 | + AnswerChoice.C, |
| 73 | + 'The main circuit board of a computer that houses the CPU, memory, and other essential components.', |
| 74 | + ], |
| 75 | + [ |
| 76 | + AnswerChoice.D, |
| 77 | + 'The board that a mother uses to control the computer.', |
| 78 | + ], |
| 79 | + ]), |
| 80 | + AnswerChoice.UNANSWERED, |
| 81 | + ); |
| 82 | + } |
| 83 | +} |
0 commit comments