From b1884bcf9e85070088e691b66d03606e4269a23a Mon Sep 17 00:00:00 2001 From: Mohamed <“moibrahi7@gmail.com”> Date: Mon, 4 Mar 2024 08:52:48 -0500 Subject: [PATCH] commit --- .../lesson3/quizzes/MohamedIbrahimQuiz.java | 38 +++++++++++++++++++ .../src/test/resources/application.yml | 4 ++ 2 files changed, 42 insertions(+) create mode 100644 lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/MohamedIbrahimQuiz.java diff --git a/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/MohamedIbrahimQuiz.java b/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/MohamedIbrahimQuiz.java new file mode 100644 index 00000000..4861cb42 --- /dev/null +++ b/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/MohamedIbrahimQuiz.java @@ -0,0 +1,38 @@ +package com.codedifferently.lesson3.quizzes; + +import com.codedifferently.instructional.quiz.AnswerChoice; +import com.codedifferently.instructional.quiz.MultipleChoiceQuizQuestion; +import com.codedifferently.instructional.quiz.QuizQuestion; +import com.codedifferently.instructional.quiz.QuizQuestionProvider; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Service; + +@Service +public class MohamedIbrahimQuiz implements QuizQuestionProvider { + + public String getProviderName() { + return "moibrahi7"; + } + + public List makeQuizQuestions() { + return List.of(makeQuestion0(), makeQuestion1()); + } + + private QuizQuestion makeQuestion0() { + return new MultipleChoiceQuizQuestion( + 0, + "What are essential parts to building a computer? (without the inclution of a case)", + Map.of( + AnswerChoice.A, "CPU, RAM, MOTHERBOARD, GPU, CPU COOLER", + AnswerChoice.B, "RAM, MOTHERBOARD, HARD DRIVE, GPU, CPU COOLER", + AnswerChoice.C, "RAM, CPU, HARD DRIVE, MOTHERBOARD, CPU COOLER", + AnswerChoice.D, "RAM, HARD DRIVE, GPU"), + AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer. + } + + private QuizQuestion makeQuestion1() { + return new QuizQuestion( + 1, "What is the base 10 equivalant of 547 in base 8?", "0000"); // Provide an answer. + } +} diff --git a/lesson_03/quiz/lesson_03_quiz/src/test/resources/application.yml b/lesson_03/quiz/lesson_03_quiz/src/test/resources/application.yml index 7c6b2bdd..762db639 100644 --- a/lesson_03/quiz/lesson_03_quiz/src/test/resources/application.yml +++ b/lesson_03/quiz/lesson_03_quiz/src/test/resources/application.yml @@ -6,3 +6,7 @@ quiz: anthonymays: - $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK - $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe + + moibrahi7: + - $2y$10$qMRtpEAfuW9e5WyZv5qzxuTj3JDO4xuOrNwm1FZuQ9uGcm3NHZMC. + - $2y$10$VOND8Wn7DA7DHPhJWmyMqurfRkjWZv3m3VnG29TfTOTRusxTNKa6q