Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addquiz #123

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<QuizQuestion> 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.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down