|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class ZionBuchananQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'ZionBuchanan'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + ZionBuchananQuiz.makeQuestion0(), |
| 16 | + ZionBuchananQuiz.makeQuestion1(), |
| 17 | + ZionBuchananQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'What is a computer?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'A machine that transforms input data to output'], |
| 27 | + [AnswerChoice.B, 'A device that only stores information'], |
| 28 | + [AnswerChoice.C, 'A system that requires no user input to function'], |
| 29 | + [ |
| 30 | + AnswerChoice.D, |
| 31 | + 'A machine that operates only when connected to the internet.', |
| 32 | + ], |
| 33 | + ]), |
| 34 | + AnswerChoice.UNANSWERED, |
| 35 | + ); // Replace `UNANSWERED` with the correct answer. |
| 36 | + } |
| 37 | + |
| 38 | + private static makeQuestion1(): QuizQuestion { |
| 39 | + return new MultipleChoiceQuizQuestion( |
| 40 | + 1, |
| 41 | + 'Why do we use IDEs?', |
| 42 | + new Map<AnswerChoice, string>([ |
| 43 | + [AnswerChoice.A, 'to issue tracking and debugging'], |
| 44 | + [AnswerChoice.B, 'Managing source control'], |
| 45 | + [AnswerChoice.C, 'Refactoring code'], |
| 46 | + [AnswerChoice.D, 'All of the above'], |
| 47 | + ]), |
| 48 | + AnswerChoice.UNANSWERED, |
| 49 | + ); // Replace `UNANSWERED` with the correct answer. |
| 50 | + } |
| 51 | + |
| 52 | + private static makeQuestion2(): QuizQuestion { |
| 53 | + return new MultipleChoiceQuizQuestion( |
| 54 | + 2, |
| 55 | + 'What is a branch?', |
| 56 | + new Map<AnswerChoice, string>([ |
| 57 | + [ |
| 58 | + AnswerChoice.A, |
| 59 | + 'A kind of software program that runs on every computer automatically.', |
| 60 | + ], |
| 61 | + [AnswerChoice.B, 'Both Choices A and D'], |
| 62 | + [ |
| 63 | + AnswerChoice.C, |
| 64 | + 'A specialized type of car engine designed for off-road vehicles.', |
| 65 | + ], |
| 66 | + [ |
| 67 | + AnswerChoice.D, |
| 68 | + 'A copy of the repository that allows you to make changes and merge them back later.', |
| 69 | + ], |
| 70 | + ]), |
| 71 | + AnswerChoice.UNANSWERED, |
| 72 | + ); // Replace `UNANSWERED` with the correct answer. |
| 73 | + } |
| 74 | +} |
0 commit comments