Skip to content

Commit

Permalink
Feat: add Nataya Quiz (#116)
Browse files Browse the repository at this point in the history
* changed number  1

* feat: Answered quiz questions

* feat: Remade my branch and created quiz with answers

* Update Lesson2.java
  • Loading branch information
NatayaP committed Mar 5, 2024
1 parent 0b77890 commit e10ebd1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
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 NatayaPriceQuiz implements QuizQuestionProvider {

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

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

private QuizQuestion makeQuestion0() {
return new MultipleChoiceQuizQuestion(
0,
"Programmable read-only memory (PROM) chips can be programmed..",
Map.of(
AnswerChoice.A, "Once",
AnswerChoice.B, "Twice",
AnswerChoice.C, "However many times you would like to",
AnswerChoice.D, "Every so often"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
}

private QuizQuestion makeQuestion1() {
return new MultipleChoiceQuizQuestion(
1,
"Who designed and programmed the VisiCalc?",
Map.of(
AnswerChoice.A, "Alan Kay and Douglas Engelbart",
AnswerChoice.B, "Ken Thompson and Dennis Ritchie",
AnswerChoice.C, "Dan Bricklin and Bob Frankston",
AnswerChoice.D, "Tom and Jerry"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ quiz:
javyenware:
- $2y$10$BeOZiGHEZhPmVsDZctelR.MoJM.d958.kQNXUbU8wv9YJv6y5LCyi
- $2y$10$7ME1EOl6VP35kEiUc4YFG.ZOgOcfmoOrsvgjsoGY9xoVPdlH3uK8K
natayaprice:
- $2y$10$6w0xRxY6E5rxLdyAMUxx9uPG99NfeO1CvzXYN7lV2byuXZR80IViq
- $2y$10$CboWGiUM5PlkHOkOL96IGuFhSs4yZweZA.6wVHOCYCX87eGOamq26

0 comments on commit e10ebd1

Please sign in to comment.