-
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.
* chore: made quiz folder under quizzes * added 2 questions * chore: updated questions and added an * added another question * chore: added answers * chore: deleted 1 question * chore: updated question and answers * chore: fixed answers * deleted file * update * update * update * undo files * delete settings file
- Loading branch information
1 parent
bc5d932
commit ae9da2f
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...uiz/lesson_03_quiz/src/main/java/com/codedifferently/lesson3/quizzes/RandycastroQuiz.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,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 RandycastroQuiz implements QuizQuestionProvider { | ||
|
||
public String getProviderName() { | ||
return "randycastro"; | ||
} | ||
|
||
public List<QuizQuestion> makeQuizQuestions() { | ||
return List.of(makeQuestion0(), makeQuestion1()); | ||
} | ||
|
||
private QuizQuestion makeQuestion0() { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
"What does CPU stand for?", | ||
Map.of( | ||
AnswerChoice.A, "Central Processing Unit", | ||
AnswerChoice.B, "Computer Power Unit", | ||
AnswerChoice.C, "Control Processing Unit", | ||
AnswerChoice.D, "Central Power Unit"), | ||
AnswerChoice.A); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
|
||
private QuizQuestion makeQuestion1() { | ||
return new MultipleChoiceQuizQuestion( | ||
1, | ||
"Which of the following is a type of computer memory that is volatile and loses its contents when the power is turned off?", | ||
Map.of( | ||
AnswerChoice.A, "ROM (Read-Only Memory)", | ||
AnswerChoice.B, "RAM (Random Access Memory)", | ||
AnswerChoice.C, "HDD (Hard Disk Drive)", | ||
AnswerChoice.D, "SSD (Solid State Drive)"), | ||
AnswerChoice.D); // Replace 'UNANSWERED' with the correct 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