diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index f077fd998..bca3f429d 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 + dylanlafferty: + - $2y$10$JpiqIw6Ip/DUgaOkggURk.wP1OtxxAlmYJvVPJQ/6GfG3SslHNrBu + - $2y$10$mPlPI9IsKf8cCKyQj3gtTOY8ffwgwTddHHjVAVd1PcAzfatOHED06 + - $2y$10$Sr6Fu4QqmqX/oKYnypzQ9e4SxOiTuFAgnLVNd6rKz9AxZlcAjWwaK diff --git a/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts new file mode 100644 index 000000000..84075734e --- /dev/null +++ b/lesson_03/quiz/src/quizzes/Dylan_Lafferty_quiz.ts @@ -0,0 +1,61 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class DylanLaffertyQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'dylanlafferty'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + DylanLaffertyQuiz.makeQuestion0(), + DylanLaffertyQuiz.makeQuestion1(), + DylanLaffertyQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What is the Power supply unit most compared to when comparing it to a human body?', + new Map([ + [AnswerChoice.A, 'Heart'], + [AnswerChoice.B, 'Arm'], + [AnswerChoice.C, 'Leg'], + [AnswerChoice.D, 'Brain'], + ]), + AnswerChoice.A, + ); + } + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'What is the full name of CPU?', + new Map([ + [AnswerChoice.A, 'Central Place Unit'], + [AnswerChoice.B, 'Certified Processing Unit'], + [AnswerChoice.C, 'Central Processing Unit'], + [AnswerChoice.D, 'Configured Procerdale Unicode'], + ]), + AnswerChoice.C, + ); + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'What is used to keep Short term memory in a computer?', + new Map([ + [AnswerChoice.A, 'Hard Drive'], + [AnswerChoice.B, 'SSD'], + [AnswerChoice.C, 'GPU'], + [AnswerChoice.D, 'RAM'], + ]), + AnswerChoice.D, + ); + } +} diff --git a/lesson_03/quiz/src/quizzes/quizzes.module.ts b/lesson_03/quiz/src/quizzes/quizzes.module.ts index ac82f4600..de3a0d6ba 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 { DylanLaffertyQuiz } from './Dylan_Lafferty_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); // Add your quiz provider here. -const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz]; +const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, DylanLaffertyQuiz]; @Module({ providers: [