Skip to content

Commit

Permalink
feat: adds Jordan's quiz (#118)
Browse files Browse the repository at this point in the history
* adding my Quiz and answers

* Update: Quiz complete and tests passed
  • Loading branch information
HeirJordan3 committed Mar 5, 2024
1 parent e10ebd1 commit 51d9872
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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 JordanEldridgeQuiz implements QuizQuestionProvider {

public String getProviderName() {
return "jordaneldridge";
}

public List<QuizQuestion> makeQuizQuestions() {
return List.of(makeQuestion0(), makeQuestion1());
}

private QuizQuestion makeQuestion0() {
return new MultipleChoiceQuizQuestion(
0,
"What is the size of float and double in java?",
Map.of(
AnswerChoice.A,
"34 and 64",
AnswerChoice.B,
"32 and 32",
AnswerChoice.C,
"34 and 34",
AnswerChoice.D,
"64 and 32"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
}

private QuizQuestion makeQuestion1() {
return new MultipleChoiceQuizQuestion(
1,
"Arrays in java are-",
Map.of(
AnswerChoice.A,
"Object references",
AnswerChoice.B,
"objects",
AnswerChoice.C,
"Primitive data type",
AnswerChoice.D,
"none"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ quiz:
javyenware:
- $2y$10$BeOZiGHEZhPmVsDZctelR.MoJM.d958.kQNXUbU8wv9YJv6y5LCyi
- $2y$10$7ME1EOl6VP35kEiUc4YFG.ZOgOcfmoOrsvgjsoGY9xoVPdlH3uK8K
jordaneldridge:
- $2y$10$1.1MtWYxD3gDw6VOmRot6OA.TQcPc1FzenesnN.RJn.6EYD.eG0s6
- $2y$10$C39zXtqTtYWE63Xb9av72evDs8U1ErCu30T5a4YGztaCJTbrjL7fC
natayaprice:
- $2y$10$6w0xRxY6E5rxLdyAMUxx9uPG99NfeO1CvzXYN7lV2byuXZR80IViq
- $2y$10$CboWGiUM5PlkHOkOL96IGuFhSs4yZweZA.6wVHOCYCX87eGOamq26

0 comments on commit 51d9872

Please sign in to comment.