|
| 1 | +import { |
| 2 | + AnswerChoice, |
| 3 | + MultipleChoiceQuizQuestion, |
| 4 | + QuizQuestion, |
| 5 | + QuizQuestionProvider, |
| 6 | +} from 'codedifferently-instructional'; |
| 7 | + |
| 8 | +export class DeanWalstonQuiz implements QuizQuestionProvider { |
| 9 | + getProviderName(): string { |
| 10 | + return 'dean_walston_25_2'; |
| 11 | + } |
| 12 | + |
| 13 | + makeQuizQuestions(): QuizQuestion[] { |
| 14 | + return [ |
| 15 | + DeanWalstonQuiz.makeQuestion0(), |
| 16 | + DeanWalstonQuiz.makeQuestion1(), |
| 17 | + DeanWalstonQuiz.makeQuestion2(), |
| 18 | + DeanWalstonQuiz.makeQuestion3(), |
| 19 | + ]; |
| 20 | + } |
| 21 | + |
| 22 | + private static makeQuestion0(): QuizQuestion { |
| 23 | + return new MultipleChoiceQuizQuestion( |
| 24 | + 0, |
| 25 | + 'What is a programming language?', |
| 26 | + new Map<AnswerChoice, string>([ |
| 27 | + [AnswerChoice.A, 'A way to communicate with computers'], |
| 28 | + [AnswerChoice.B, 'A formal language for writing instructions'], |
| 29 | + [AnswerChoice.C, 'A set of rules for creating software'], |
| 30 | + [AnswerChoice.D, 'All of the above'], |
| 31 | + ]), |
| 32 | + AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer. |
| 33 | + ); |
| 34 | + } |
| 35 | + |
| 36 | + private static makeQuestion1(): QuizQuestion { |
| 37 | + return new MultipleChoiceQuizQuestion( |
| 38 | + 1, |
| 39 | + 'What is source code?', |
| 40 | + new Map<AnswerChoice, string>([ |
| 41 | + [AnswerChoice.A, 'The final program that users can run'], |
| 42 | + [ |
| 43 | + AnswerChoice.B, |
| 44 | + 'The human-readable instructions written in a programming language', |
| 45 | + ], |
| 46 | + [AnswerChoice.C, 'The binary code that computers execute'], |
| 47 | + [AnswerChoice.D, 'The documentation for a program'], |
| 48 | + ]), |
| 49 | + AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer. |
| 50 | + ); |
| 51 | + } |
| 52 | + |
| 53 | + private static makeQuestion2(): QuizQuestion { |
| 54 | + return new MultipleChoiceQuizQuestion( |
| 55 | + 2, |
| 56 | + 'Which Terminal command is used to display the current working directory path?', |
| 57 | + new Map<AnswerChoice, string>([ |
| 58 | + [AnswerChoice.A, 'cd'], |
| 59 | + [AnswerChoice.B, 'ls -l'], |
| 60 | + [AnswerChoice.C, 'pwd'], |
| 61 | + [AnswerChoice.D, 'echo $PATH'], |
| 62 | + ]), |
| 63 | + AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer. |
| 64 | + ); |
| 65 | + } |
| 66 | + |
| 67 | + private static makeQuestion3(): QuizQuestion { |
| 68 | + return new MultipleChoiceQuizQuestion( |
| 69 | + 3, |
| 70 | + 'Which Git command is used to create a new branch and switch to it?', |
| 71 | + new Map<AnswerChoice, string>([ |
| 72 | + [AnswerChoice.A, 'git branch'], |
| 73 | + [AnswerChoice.B, 'git checkout -b'], |
| 74 | + [AnswerChoice.C, 'git switch'], |
| 75 | + [AnswerChoice.D, 'git new'], |
| 76 | + ]), |
| 77 | + AnswerChoice.UNANSWERED, // Replace `UNANSWERED` with the correct answer. |
| 78 | + ); |
| 79 | + } |
| 80 | +} |
0 commit comments