|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class HummadTanweerQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'hummadtanweer'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + HummadTanweerQuiz.makeQuestion0(), |
| 16 | + HummadTanweerQuiz.makeQuestion1(), |
| 17 | + HummadTanweerQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + 'Who is attributed with inventing GIT?', |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [AnswerChoice.A, 'Linus Torvalds'], |
| 27 | + [AnswerChoice.B, 'James Gosling'], |
| 28 | + [AnswerChoice.C, 'Koska Kawaguchi'], |
| 29 | + [AnswerChoice.D, 'Junio C. Hamano'], |
| 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 | + 'What is the opposite of a GIT clone?', |
| 39 | + new Map<AnswerChoice, string>([ |
| 40 | + [AnswerChoice.A, 'GIT add'], |
| 41 | + [AnswerChoice.B, 'GIT push'], |
| 42 | + [AnswerChoice.C, 'GIT upload'], |
| 43 | + [AnswerChoice.D, 'GIT status'], |
| 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 | + 'How do you check the state of your local git repository since your last commit?', |
| 53 | + new Map<AnswerChoice, string>([ |
| 54 | + [AnswerChoice.A, 'GIT diff'], |
| 55 | + [AnswerChoice.B, 'GIT commit'], |
| 56 | + [AnswerChoice.C, 'GIT status'], |
| 57 | + [AnswerChoice.D, 'GIT check'], |
| 58 | + ]), |
| 59 | + AnswerChoice.UNANSWERED, |
| 60 | + ); // Replace `UNANSWERED` with the correct answer. |
| 61 | + } |
| 62 | +} |
0 commit comments