|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class BrooklynHardenQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'brooklynharden'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + BrooklynHardenQuiz.makeQuestion0(), |
| 16 | + BrooklynHardenQuiz.makeQuestion1(), |
| 17 | + BrooklynHardenQuiz.makeQuestion2(), |
| 18 | + ]; |
| 19 | + } |
| 20 | + |
| 21 | + private static makeQuestion0(): QuizQuestion { |
| 22 | + return new MultipleChoiceQuizQuestion( |
| 23 | + 0, |
| 24 | + "What does 'git checkout -b (your-branch-name)' do?", |
| 25 | + new Map<AnswerChoice, string>([ |
| 26 | + [ |
| 27 | + AnswerChoice.A, |
| 28 | + 'Deletes the current branch and switches to a new one', |
| 29 | + ], |
| 30 | + [AnswerChoice.B, 'Creates a new branch and merges it immediately'], |
| 31 | + [ |
| 32 | + AnswerChoice.C, |
| 33 | + 'Creates a new branch, while also switching to that current branch just made', |
| 34 | + ], |
| 35 | + [ |
| 36 | + AnswerChoice.D, |
| 37 | + 'Switches to an existing branch without creating a new one', |
| 38 | + ], |
| 39 | + ]), |
| 40 | + AnswerChoice.UNANSWERED, |
| 41 | + ); // Replace `UNANSWERED` with the correct answer. |
| 42 | + } |
| 43 | + |
| 44 | + private static makeQuestion1(): QuizQuestion { |
| 45 | + return new MultipleChoiceQuizQuestion( |
| 46 | + 1, |
| 47 | + 'Why Do We Branch?', |
| 48 | + new Map<AnswerChoice, string>([ |
| 49 | + [ |
| 50 | + AnswerChoice.A, |
| 51 | + 'To delete unused features, to simplify project structure, and to consolidate all tasks', |
| 52 | + ], |
| 53 | + [ |
| 54 | + AnswerChoice.B, |
| 55 | + 'To merge all features into one branch, to finalize changes permanently, and to streamline the main project', |
| 56 | + ], |
| 57 | + [ |
| 58 | + AnswerChoice.C, |
| 59 | + 'To implement major updates directly, to skip testing, and to ignore project stability', |
| 60 | + ], |
| 61 | + [ |
| 62 | + AnswerChoice.D, |
| 63 | + 'To work on features or fix without affecting others, to test or deploy changes safely, and to experiment without breaking the main project', |
| 64 | + ], |
| 65 | + ]), |
| 66 | + AnswerChoice.UNANSWERED, |
| 67 | + ); // Replace `UNANSWERED` with the correct answer. |
| 68 | + } |
| 69 | + |
| 70 | + private static makeQuestion2(): QuizQuestion { |
| 71 | + return new MultipleChoiceQuizQuestion( |
| 72 | + 2, |
| 73 | + 'A version control system(VCS) that helps keep track of changes made to files, directories, and folders. It helps you save versions, create branches to try new ideas, and its fast and great for teams', |
| 74 | + new Map<AnswerChoice, string>([ |
| 75 | + [AnswerChoice.A, 'Git'], |
| 76 | + [AnswerChoice.B, 'VS Code'], |
| 77 | + [AnswerChoice.C, 'GitHub'], |
| 78 | + [AnswerChoice.D, 'XCODE'], |
| 79 | + ]), |
| 80 | + AnswerChoice.UNANSWERED, |
| 81 | + ); // Replace `UNANSWERED` with the correct answer. |
| 82 | + } |
| 83 | +} |
0 commit comments