diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index f077fd998..203b424ce 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -5,4 +5,8 @@ quiz: - $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa \ No newline at end of file + - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + computerparts: + - $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342 + - $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0. + - $2y$10$JXoeInFy4UzHhi2Lskxzeu7CQ9RprnJgBw9pjAlV.t6zQyJTyy8OK diff --git a/lesson_03/quiz/src/quizzes/jbeyquiz.ts b/lesson_03/quiz/src/quizzes/jbeyquiz.ts new file mode 100644 index 000000000..72b27d9bb --- /dev/null +++ b/lesson_03/quiz/src/quizzes/jbeyquiz.ts @@ -0,0 +1,79 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, +} from 'codedifferently-instructional'; +export class Jbeyquiz { + getProviderName() { + return 'computerparts'; + } + makeQuizQuestions() { + return [ + Jbeyquiz.makeQuestion0(), + Jbeyquiz.makeQuestion1(), + Jbeyquiz.makeQuestion2(), + ]; + } + static makeQuestion0() { + return new MultipleChoiceQuizQuestion( + 0, + 'What is RAM?', + new Map([ + [AnswerChoice.A, 'Robotic Automated Mechanism'], + [ + AnswerChoice.B, + 'A type of storage device that holds all of your files', + ], + [ + AnswerChoice.C, + 'Special software that controls your computers internet connection', + ], + [AnswerChoice.D, 'Random Access Memory'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + static makeQuestion1() { + return new MultipleChoiceQuizQuestion( + 1, + 'What is a GPU?', + new Map([ + [ + AnswerChoice.A, + 'A powerful cooling fan that keeps your computer from overheating', + ], + [AnswerChoice.B, 'A special type of harddrive'], + [ + AnswerChoice.C, + 'A special type of processor primarily designed to handleand accelerate the rendering of images, video, and animations.', + ], + [ + AnswerChoice.D, + 'A keyboard that controls the movement of your mouse on screen', + ], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + static makeQuestion2() { + return new MultipleChoiceQuizQuestion( + 2, + 'What is an SSD?', + new Map([ + [AnswerChoice.A, 'A type of RAM that stores data permanently'], + [ + AnswerChoice.B, + 'A storage device used in computers and other electronic devices', + ], + [ + AnswerChoice.C, + 'A type of USB cable that connects your computer to the internet', + ], + [ + AnswerChoice.D, + 'A type of screen that displays the contents of your computers memory', + ], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } +} diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index ac82f4600..61b17227e 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -1,11 +1,12 @@ import { Module } from '@nestjs/common'; import { AnotherQuiz } from './another_quiz.js'; import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; +import { Jbeyquiz } from './jbeyquiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz]; +const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, Jbeyquiz]; @Module({ providers: [