diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index cb1997925..4b967277c 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -6,6 +6,10 @@ quiz: anotherone: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa + davidsmith: + - $2y$10$EM5346ILJER4xu66qf1OcuJ/7f6hCOb9z1OUHgSXvl3QuCohBySTm + - $2y$10$gWIUYJPn94weKopOVQKTl.XOwODK1tamszmt4uXCJupZofi7vXPdq + - $2y$10$eh1.Cd6tXSmolUnY02xwM.BVR7RkYqJIDHepPfk8wJBIwol4jRw0S dennislipscomb: - $2y$10$Y9gmPBd6JGgk06f/uv1MNOGf7sqxqfxYmF5GW48aZ95Homie8FdCC - $2y$10$vSETgB7wDGzpe5IQwGaZee2N7n1FafP.UelRv3QfpnZ4e.wvUmN8e diff --git a/lesson_03/quiz/src/quizzes/david_smith_quiz.ts b/lesson_03/quiz/src/quizzes/david_smith_quiz.ts new file mode 100644 index 000000000..f732719b1 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/david_smith_quiz.ts @@ -0,0 +1,57 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class DavidSmithQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'davidsmith'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + DavidSmithQuiz.makeQuestion0(), + DavidSmithQuiz.makeQuestion1(), + DavidSmithQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'Where have I worked before?', + new Map([ + [AnswerChoice.A, 'JPMorganChase&Co.'], + [AnswerChoice.B, 'Capital One'], + [AnswerChoice.C, 'Nvidia'], + [AnswerChoice.D, 'Meta'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Have I worked at Code Differently before?', + new Map([ + [AnswerChoice.A, 'Yes'], + [AnswerChoice.B, 'No'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'Was Jordan my teacher when I started coding', + new Map([ + [AnswerChoice.A, 'Yes'], + [AnswerChoice.B, 'No'], + ]), + 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 9f343d72e..f7922ae95 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -6,6 +6,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { ChelseaOgbonniaQuiz } from './chelsea_ogbonnia_quiz.js'; import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; import { DasiaEnglishQuiz } from './dasia_english_quiz.js'; +import { DavidSmithQuiz } from './david_smith_quiz.js'; import { DennisQuiz } from './dennis_quiz.js'; import { HummadTanweerQuiz } from './hummad_tanweer_quiz.js'; import { JamesCapparellQuiz } from './james_capparell_quiz.js'; @@ -22,10 +23,11 @@ import { ZionBuchananQuiz } from './zion_buchanan_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); -// Add your quiz provider here.; +// Add your quiz provider here. const QUIZ_PROVIDERS = [ AnthonyMaysQuiz, YafiahAbdullahQuiz, + DavidSmithQuiz, JamesCapparellQuiz, AnotherQuiz, JosephCaballeroQuiz,