|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class TrinitieJacksonQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'trinitiejackson'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + TrinitieJacksonQuiz.makeQuestion0(), |
| 16 | + TrinitieJacksonQuiz.makeQuestion1(), |
| 17 | + TrinitieJacksonQuiz.makeQuestion2(), |
| 18 | + TrinitieJacksonQuiz.makeQuestion3(), |
| 19 | + ]; |
| 20 | + } |
| 21 | + |
| 22 | + private static makeQuestion0(): QuizQuestion { |
| 23 | + return new MultipleChoiceQuizQuestion( |
| 24 | + 0, |
| 25 | + 'Where was the term "fork" coined from?', |
| 26 | + new Map<AnswerChoice, string>([ |
| 27 | + [AnswerChoice.A, 'GitHub'], |
| 28 | + [AnswerChoice.B, 'Eclipse'], |
| 29 | + [AnswerChoice.C, 'XCode'], |
| 30 | + [AnswerChoice.D, 'NetBeans'], |
| 31 | + ]), |
| 32 | + AnswerChoice.UNANSWERED, |
| 33 | + ); // Replace `UNANSWERED` with the correct answer. |
| 34 | + } |
| 35 | + |
| 36 | + private static makeQuestion1(): QuizQuestion { |
| 37 | + return new MultipleChoiceQuizQuestion( |
| 38 | + 1, |
| 39 | + 'In the desk analogy, what is the CPU?', |
| 40 | + new Map<AnswerChoice, string>([ |
| 41 | + [AnswerChoice.A, 'motherboard'], |
| 42 | + [AnswerChoice.B, 'power supply'], |
| 43 | + [AnswerChoice.C, 'software'], |
| 44 | + [AnswerChoice.D, 'calculator'], |
| 45 | + ]), |
| 46 | + AnswerChoice.UNANSWERED, |
| 47 | + ); // Replace `UNANSWERED` with the correct answer. |
| 48 | + } |
| 49 | + |
| 50 | + private static makeQuestion2(): QuizQuestion { |
| 51 | + return new MultipleChoiceQuizQuestion( |
| 52 | + 2, |
| 53 | + 'What does the "cat" command do in a terminal?', |
| 54 | + new Map<AnswerChoice, string>([ |
| 55 | + [AnswerChoice.A, 'copy a file or directory'], |
| 56 | + [AnswerChoice.B, 'dumps contents of a file'], |
| 57 | + [AnswerChoice.C, 'run any command'], |
| 58 | + [AnswerChoice.D, 'view the last several lines of a file'], |
| 59 | + ]), |
| 60 | + AnswerChoice.UNANSWERED, |
| 61 | + ); // Replace `UNANSWERED` with the correct answer. |
| 62 | + } |
| 63 | + |
| 64 | + private static makeQuestion3(): QuizQuestion { |
| 65 | + return new MultipleChoiceQuizQuestion( |
| 66 | + 3, |
| 67 | + 'Which is NOT a void element in HTML?', |
| 68 | + new Map<AnswerChoice, string>([ |
| 69 | + [AnswerChoice.A, 'img'], |
| 70 | + [AnswerChoice.B, 'input'], |
| 71 | + [AnswerChoice.C, 'br'], |
| 72 | + [AnswerChoice.D, 'p'], |
| 73 | + ]), |
| 74 | + AnswerChoice.UNANSWERED, |
| 75 | + ); // Replace `UNANSWERED` with the correct answer. |
| 76 | + } |
| 77 | +} |
0 commit comments