diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index c138f5442..5de7eb536 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -43,8 +43,11 @@ quiz: - $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw. - $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq - $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi - + zionbuchanan: + - $2y$10$ufNCdP1efvioBYIih6K92uye33p5ckN/IrxfCvw4n7agHjN8aNfhe + - $2y$10$Mb7LA1kqlDRWlN9jdBYvF.u1B8cmJqXWkrxQeMr/3ETRVOAzFlflG + - $2y$10$9bTVOlLmkj4y5f9u1b3sgeTQ9hIrVFrGiz71B0HTxiIidqq0VXHGS shawndunsmore: - $2y$10$Kpde4LAfDyEhgWezFoI5texc53Sge6QQs8y5hR8DA7zHfyK8It5LW - $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS - - $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS + - $2y$10$T061IZuccoHb2XGjaICB/Olchf62DqrSDVIE0TE9Q9qidfLAL7sHS \ No newline at end of file diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index 8d2fd086c..57768457b 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,16 +1,17 @@ import { Module } from '@nestjs/common'; +import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js'; import { AngelicaCQuiz } from './angelica_c_quiz.js'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; -import { JamesCapparellQuiz } from './james_capparell_quiz.js'; -import { XavierCruzQuiz } from './xavier_cruz_quiz.js'; -import { DasiaEnglishQuiz } from './dasia_english_quiz.js'; import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; +import { DasiaEnglishQuiz } from './dasia_english_quiz.js'; +import { JamesCapparellQuiz } from './james_capparell_quiz.js'; import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js'; import { ShawnDunsmoreQuiz } from './shawn_dunsmore_quiz.js'; +import { XavierCruzQuiz } from './xavier_cruz_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; -import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js'; +import { ZionBuchananQuiz } from './zion_buchanan_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); @@ -27,7 +28,8 @@ const QUIZ_PROVIDERS = [ DasiaEnglishQuiz, ChigazoGrahamsQuiz, AmiyahJonesQuiz, - XavierCruzQuiz + XavierCruzQuiz, + ZionBuchananQuiz, ]; @Module({ diff --git a/lesson_03/quiz/src/quizzes/zion_buchanan_quiz.ts b/lesson_03/quiz/src/quizzes/zion_buchanan_quiz.ts new file mode 100644 index 000000000..b425c8c2b --- /dev/null +++ b/lesson_03/quiz/src/quizzes/zion_buchanan_quiz.ts @@ -0,0 +1,74 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class ZionBuchananQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'zionbuchanan'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + ZionBuchananQuiz.makeQuestion0(), + ZionBuchananQuiz.makeQuestion1(), + ZionBuchananQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is a computer?', + new Map([ + [AnswerChoice.A, 'A machine that transforms input data to output'], + [AnswerChoice.B, 'A device that only stores information'], + [AnswerChoice.C, 'A system that requires no user input to function'], + [ + AnswerChoice.D, + 'A machine that operates only when connected to the internet.', + ], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Why do we use IDEs?', + new Map([ + [AnswerChoice.A, 'to issue tracking and debugging'], + [AnswerChoice.B, 'Managing source control'], + [AnswerChoice.C, 'Refactoring code'], + [AnswerChoice.D, 'All of the above'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is a branch?', + new Map([ + [ + AnswerChoice.A, + 'A kind of software program that runs on every computer automatically.', + ], + [AnswerChoice.B, 'Both Choices A and D'], + [ + AnswerChoice.C, + 'A specialized type of car engine designed for off-road vehicles.', + ], + [ + AnswerChoice.D, + 'A copy of the repository that allows you to make changes and merge them back later.', + ], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } +}