|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class LJMcWilliamsQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'ljmcwilliams'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + LJMcWilliamsQuiz.makeQuestion0(), |
| 16 | + LJMcWilliamsQuiz.makeQuestion1(), |
| 17 | + LJMcWilliamsQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'Which component of a computer is responsible for short-term memory?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'Motherboard'], |
| 27 | + [AnswerChoice.B, 'CPU (Central Processing Unit)'], |
| 28 | + [AnswerChoice.C, 'RAM (Random Access Memory)'], |
| 29 | + [AnswerChoice.D, 'Power Supply'], |
| 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 terminal command allows a user to copy a file or directory?', |
| 39 | + new Map<AnswerChoice, string>([ |
| 40 | + [AnswerChoice.A, 'cp file-name'], |
| 41 | + [AnswerChoice.B, 'cpy file-name'], |
| 42 | + [AnswerChoice.C, 'dupe file-name'], |
| 43 | + [AnswerChoice.D, 'make file-name'], |
| 44 | + ]), |
| 45 | + AnswerChoice.UNANSWERED, |
| 46 | + ); // Replace `UNANSWERED` with the correct answer. |
| 47 | + } |
| 48 | + |
| 49 | + private static makeQuestion2(): QuizQuestion { |
| 50 | + return new MultipleChoiceQuizQuestion( |
| 51 | + 2, |
| 52 | + 'Which Git command allows a user to delete a feature branch LOCALLY?', |
| 53 | + new Map<AnswerChoice, string>([ |
| 54 | + [AnswerChoice.A, 'git remove branch-name'], |
| 55 | + [AnswerChoice.B, 'git push origin --delete branch-name'], |
| 56 | + [AnswerChoice.C, 'git checkout master'], |
| 57 | + [AnswerChoice.D, 'git branch -d branch-name'], |
| 58 | + ]), |
| 59 | + AnswerChoice.UNANSWERED, |
| 60 | + ); // Replace `UNANSWERED` with the correct answer. |
| 61 | + } |
| 62 | +} |
0 commit comments