diff --git a/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/KenrickSutherlandQuiz.java b/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/KenrickSutherlandQuiz.java new file mode 100644 index 00000000..16cf5560 --- /dev/null +++ b/lesson_03/quiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/KenrickSutherlandQuiz.java @@ -0,0 +1,45 @@ +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 KenrickSutherlandQuiz implements QuizQuestionProvider { + + public String getProviderName() { + return "kenricksutherland"; + } + + public List makeQuizQuestions() { + return List.of(makeQuestion0(), makeQuestion1()); + } + + private QuizQuestion makeQuestion0() { + return new MultipleChoiceQuizQuestion( + 0, + "What is the hexadecimal representation of the decimal number 255?", + Map.of( + AnswerChoice.A, "EE", + AnswerChoice.B, "CC", + AnswerChoice.C, "FF", + AnswerChoice.D, "DD"), + AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer. + } + + private QuizQuestion makeQuestion1() { + return new MultipleChoiceQuizQuestion( + 1, + "Which component of a computer is primarily responsible for executing instructions and performing calculations??", + Map.of( + AnswerChoice.A, "CPU", + AnswerChoice.B, "RAM", + AnswerChoice.C, "GPU", + AnswerChoice.D, "SSD"), + AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct 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 2ae4581b..10be45b6 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 @@ -3,6 +3,9 @@ spring: active: dev quiz: answers: + kenricksutherland: + - $2y$10$UaUgisFsIHm9WlhdpI1pTuwb7ArlzFDouZb7PbMcgukf66/InLJs. + - $2y$10$mmKQ0mNUJ6wfGOgKfJH7a.6vBZon2j3r.cnAaI7lAu8pAIZ7JO3v. brooklyn: - $2y$10$.mMoSMt3GJ8RQUGigwrbfei0r3ax2Gnn3R6TbUNOaGe6L7YBruehO - $2y$10$5PaRHu4pigJBwuinPkwxCOhk/j86xTFlLo8A2HhQZ3sEJoRbVMhdy