diff --git a/lesson_03/quiz/quiz.yaml b/lesson_03/quiz/quiz.yaml index e498ca944..a3bcaeced 100644 --- a/lesson_03/quiz/quiz.yaml +++ b/lesson_03/quiz/quiz.yaml @@ -22,3 +22,7 @@ quiz: - $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql. - $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC - $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW + amiyahjones: + - $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw. + - $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq + - $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi diff --git a/lesson_03/quiz/src/quizzes/amiyah_jones_quiz.ts b/lesson_03/quiz/src/quizzes/amiyah_jones_quiz.ts new file mode 100644 index 000000000..c67d08a27 --- /dev/null +++ b/lesson_03/quiz/src/quizzes/amiyah_jones_quiz.ts @@ -0,0 +1,62 @@ +import { + AnswerChoice, + MultipleChoiceQuizQuestion, + QuizQuestion, + QuizQuestionProvider, +} from 'codedifferently-instructional'; + +export class AmiyahJonesQuiz implements QuizQuestionProvider { + getProviderName(): string { + return 'amiyahjones'; + } + + makeQuizQuestions(): QuizQuestion[] { + return [ + AmiyahJonesQuiz.makeQuestion0(), + AmiyahJonesQuiz.makeQuestion1(), + AmiyahJonesQuiz.makeQuestion2(), + ]; + } + + private static makeQuestion0(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 0, + 'What two computer parts get mixed up often?', + new Map([ + [AnswerChoice.A, 'Power supply and mother board'], + [AnswerChoice.B, 'Graphics card and ram'], + [AnswerChoice.C, 'Ram and hard drive'], + [AnswerChoice.D, 'None of them get mixed up'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion1(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 1, + 'Which computer part figures out how everything is supposed to look on your screen?', + new Map([ + [AnswerChoice.A, 'Graphics card'], + [AnswerChoice.B, 'CPU'], + [AnswerChoice.C, 'Mother board'], + [AnswerChoice.D, 'Ram'], + ]), + AnswerChoice.UNANSWERED, + ); // Replace `UNANSWERED` with the correct answer. + } + + private static makeQuestion2(): QuizQuestion { + return new MultipleChoiceQuizQuestion( + 2, + 'Which computer part houses everything?', + new Map([ + [AnswerChoice.A, 'Hard drive'], + [AnswerChoice.B, 'Case'], + [AnswerChoice.C, 'CPU'], + [AnswerChoice.D, 'Power supply'], + ]), + 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 dcfe6a95e..11fcf6257 100644 --- a/lesson_03/quiz/src/quizzes/quizzes.module.ts +++ b/lesson_03/quiz/src/quizzes/quizzes.module.ts @@ -5,6 +5,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js'; import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js'; import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js'; import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js'; +import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js'; export const Quizzes = Symbol.for('Quizzes'); @@ -16,7 +17,9 @@ const QUIZ_PROVIDERS = [ AnotherQuiz, JosephCaballeroQuiz, OyeyemiJimohQuiz, - ChigazoGrahamsQuiz]; + ChigazoGrahamsQuiz, + AmiyahJonesQuiz +]; @Module({ providers: [