Skip to content

Commit

Permalink
feat: Adds Aaron's quiz (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron2278 authored Mar 7, 2024
1 parent 7944b0a commit 8c26ffc
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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 AaronSantiagoQuiz implements QuizQuestionProvider {

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

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

private QuizQuestion makeQuestion0() {
return new MultipleChoiceQuizQuestion(
0,
"What is Object Oriented Programming?",
Map.of(
AnswerChoice.A,
"A programming language model organized around objects rather than actions, and data rather than logic.",
AnswerChoice.B,
"A programming convention that only allows for the use of specific Objects.",
AnswerChoice.C,
"Using Objects to program.",
AnswerChoice.D,
"A paradigm of building computer programs using expressions and functions without mutating state and data."),
AnswerChoice.UNANSWERED);
}

private QuizQuestion makeQuestion1() {
return new MultipleChoiceQuizQuestion(
1,
"Which data type is used to represent textual data in Java?",
Map.of(
AnswerChoice.A, "int",
AnswerChoice.B, "String",
AnswerChoice.C, "boolean",
AnswerChoice.D, "float"),
AnswerChoice.UNANSWERED);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ quiz:
mekhiwilliams:
- $2y$10$LJMoAo2n0KtfU37Ulqalc.CF5CgXRD7Njp5UL6O7jH3.71q6Iu28u
- $2y$10$bnBo4IRqGodV5lHFSsMbcOTTfZrxSwwR2hTp1ft4sD8b9dNbJcBjO
aaronsantiago:
- $2y$10$QFzEBrwDmU2HP42i4fhcH.XKXHb5hw56bpQJ1l23LsgZqtMjptCdm
- $2y$10$vldOhuX/.5WcqZRxQiilAeeDsyNGqFGE.zl1Fd22Nx.baomFvgbV6

0 comments on commit 8c26ffc

Please sign in to comment.