Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jamira lesson3 #120

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to revert this file. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still changes in this file that should not be here. You should probably use git checkout to get the state of this file before you made any changes, use git commit to apply the revert, and then git push to update this PR on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static QuizQuestion makeQuestion0() {
AnswerChoice.B, "The monitor",
AnswerChoice.C, "The keyboard",
AnswerChoice.D, "The mouse"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.A); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion1() {
Expand All @@ -64,7 +64,7 @@ private static QuizQuestion makeQuestion1() {
AnswerChoice.B, "The keyboard",
AnswerChoice.C, "The CPU",
AnswerChoice.D, "RAM"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer
AnswerChoice.C); // Replace `UNANSWERED` with the correct answer
}

private static QuizQuestion makeQuestion2() {
Expand All @@ -76,7 +76,7 @@ private static QuizQuestion makeQuestion2() {
AnswerChoice.B, "The GPU",
AnswerChoice.C, "RAM",
AnswerChoice.D, "The motherboard"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion3() {
Expand All @@ -88,7 +88,7 @@ private static QuizQuestion makeQuestion3() {
AnswerChoice.B, "The keyboard",
AnswerChoice.C, "RAM",
AnswerChoice.D, "The GPU"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.C); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion4() {
Expand All @@ -100,7 +100,7 @@ private static QuizQuestion makeQuestion4() {
AnswerChoice.B, "Storage devices",
AnswerChoice.C, "RAM",
AnswerChoice.D, "CPU"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion5() {
Expand All @@ -112,28 +112,28 @@ private static QuizQuestion makeQuestion5() {
AnswerChoice.B, "Storage",
AnswerChoice.C, "RAM",
AnswerChoice.D, "CPU"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.A); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion6() {
return new QuizQuestion(
6,
"What is the decimal number 34 in binary?",
"0b00000000"); // Replace the correct digits in the answer.
"0b00100010"); // Replace the correct digits in the answer.
}

private static QuizQuestion makeQuestion7() {
return new QuizQuestion(
7,
"What is the decimal number 34 in hex?",
"0x00"); // Replace the correct digits in the answer.
"0x22"); // Replace the correct digits in the answer.
}

private static QuizQuestion makeQuestion8() {
return new QuizQuestion(
8,
"What is binary number 0b01100101 in decimal?",
"0"); // Specify the correct number (no leading zeros).
"101"); // Specify the correct number (no leading zeros).
}

private static QuizQuestion makeQuestion9() {
Expand All @@ -145,7 +145,7 @@ private static QuizQuestion makeQuestion9() {
AnswerChoice.B, "git pull <branch-name>",
AnswerChoice.C, "git checkout -b <branch-name>",
AnswerChoice.D, "git push <branch-name>"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.C); // Replace `UNANSWERED` with the correct answer.
}

private static QuizQuestion makeQuestion10() {
Expand All @@ -157,6 +157,6 @@ private static QuizQuestion makeQuestion10() {
AnswerChoice.B, "There is no difference since everything is a branch to git",
AnswerChoice.C, "A fork requires an upstream remote whereas a branch does not",
AnswerChoice.D, "You can only make pull requests using a branch"),
AnswerChoice.UNANSWERED); // Replace `UNANSWERED` with the correct answer.
AnswerChoice.B); // Replace `UNANSWERED` with the correct answer.
}
}
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 JamiraBailey implements QuizQuestionProvider {

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

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

private QuizQuestion makeQuestion0() {
return new MultipleChoiceQuizQuestion(
0,
"How many bits are in a byte in binary notation?",
Map.of(
AnswerChoice.A, "4",
AnswerChoice.B, "6",
AnswerChoice.C, "8",
AnswerChoice.D, "10"),
AnswerChoice.C); // Replace `UNANSWERED` with the correct answer.
}

private QuizQuestion makeQuestion1() {
return new QuizQuestion(
1, "What does CPU stand for?", "Central Processing Unit"); // Provide an answer.
}
}
10 changes: 3 additions & 7 deletions lesson_03/quiz/lesson_03_quiz/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ quiz:
javyenware:
- $2y$10$BeOZiGHEZhPmVsDZctelR.MoJM.d958.kQNXUbU8wv9YJv6y5LCyi
- $2y$10$7ME1EOl6VP35kEiUc4YFG.ZOgOcfmoOrsvgjsoGY9xoVPdlH3uK8K
jordaneldridge:
CD-Jamira marked this conversation as resolved.
Show resolved Hide resolved
- $2y$10$1.1MtWYxD3gDw6VOmRot6OA.TQcPc1FzenesnN.RJn.6EYD.eG0s6
- $2y$10$C39zXtqTtYWE63Xb9av72evDs8U1ErCu30T5a4YGztaCJTbrjL7fC
natayaprice:
- $2y$10$6w0xRxY6E5rxLdyAMUxx9uPG99NfeO1CvzXYN7lV2byuXZR80IViq
- $2y$10$CboWGiUM5PlkHOkOL96IGuFhSs4yZweZA.6wVHOCYCX87eGOamq26

jamirabailey:
- $2y$10$aJtp4qJqWNrm6K.RXYv9uOByboSWbCqEKOrOHS8S/nP8zjn96LnEG
- $2y$10$37XykzTG1nmwxZOjOwIBJ.QehwGuIsEPOjrl5FNEhk2ZWBwrJmitm
Loading