-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mohamed
committed
Mar 4, 2024
1 parent
9094017
commit b1884bc
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
.../lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/MohamedIbrahimQuiz.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 MohamedIbrahimQuiz implements QuizQuestionProvider { | ||
|
||
public String getProviderName() { | ||
return "moibrahi7"; | ||
} | ||
|
||
public List<QuizQuestion> makeQuizQuestions() { | ||
return List.of(makeQuestion0(), makeQuestion1()); | ||
} | ||
|
||
private QuizQuestion makeQuestion0() { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
"What are essential parts to building a computer? (without the inclution of a case)", | ||
Map.of( | ||
AnswerChoice.A, "CPU, RAM, MOTHERBOARD, GPU, CPU COOLER", | ||
AnswerChoice.B, "RAM, MOTHERBOARD, HARD DRIVE, GPU, CPU COOLER", | ||
AnswerChoice.C, "RAM, CPU, HARD DRIVE, MOTHERBOARD, CPU COOLER", | ||
AnswerChoice.D, "RAM, HARD DRIVE, GPU"), | ||
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
|
||
private QuizQuestion makeQuestion1() { | ||
return new QuizQuestion( | ||
1, "What is the base 10 equivalant of 547 in base 8?", "0000"); // Provide an answer. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters