Skip to content

Commit

Permalink
feat: adds additional questions
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony D. Mays <anthony@morganlatimer.com>
  • Loading branch information
anthonydmays committed Feb 29, 2024
1 parent 5794011 commit 054d516
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 46 deletions.
10 changes: 5 additions & 5 deletions lesson_02/quiz/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
arguments=
arguments=--init-script /Users/anthonymays/.local/share/nvim/mason/packages/jdtls/config_mac/org.eclipse.osgi/54/0/.cp/gradle/init/init.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
java.home=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=false
show.console.view=false
show.executions.view=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
6 changes: 0 additions & 6 deletions lesson_02/quiz/lesson_02_quiz/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=ignore
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=javax.annotation.ParametersAreNonnullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
Expand All @@ -14,9 +14,9 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.source=17
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public static List<QuizQuestion> makeQuizQuestions() {
makeQuestion5(),
makeQuestion6(),
makeQuestion7(),
makeQuestion8());
makeQuestion8(),
makeQuestion9(),
makeQuestion10());
}

private static QuizQuestion makeQuestion0() {
Expand Down Expand Up @@ -133,4 +135,28 @@ private static QuizQuestion makeQuestion8() {
"What is binary number 0b01100101 in decimal?",
"0"); // Specify the correct number (no leading zeros).
}

private static QuizQuestion makeQuestion9() {
return new MultipleChoiceQuizQuestion(
9,
"What git command can you use to create a new branch?",
Map.of(
AnswerChoice.A, "git checkout <branch-name>",
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.
}

private static QuizQuestion makeQuestion10() {
return new MultipleChoiceQuizQuestion(
10,
"What is the difference between a fork and a branch in git?",
Map.of(
AnswerChoice.A, "You cannot push changes to a fork",
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.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Lesson2Test {

private SoftAssertions softly;

private final int EXPECTED_NUMBER_OF_QUESTIONS = 9;
private final int EXPECTED_NUMBER_OF_QUESTIONS = 11;

@BeforeEach
void setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ quiz:
- $2y$10$iFn9/MgkxivuY52mbO5fUem7qYXIG8ryHcVbcUOPUZDNoe0jGTNPC
- $2y$10$lGfYCXq82al27tWZduYk.u.oUjte1kFysDQvCzX0QmszeTPpmXRJ2
- $2y$10$VlCST/6T58aTDJtrKq/Ljeo.djaR0pEfzVoz3EWW3D0deWQeKWZQC
- $2y$10$hNogDMb01UduWT456XvCuuD4L9EDO2AJ0ACDFPueFJwl6aoIIlsQy
- $2y$10$hNogDMb01UduWT456XvCuuD4L9EDO2AJ0ACDFPueFJwl6aoIIlsQy
- $2y$10$A41j.FhPLNTGbRlUttKrkeTfWHZ/PTITUPaYzEHd3nBs8FNmcwPB6
- $2y$10$WBf0gBTv264RQ0ON/vS69.iJUESdsnwCUNRPKNn.I67vGv0hY9jWK
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ arguments=--init-script /home/vscode/.vscode-server/data/User/globalStorage/redh
auto.sync=true
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
connection.project.dir=../../../lesson_02/quiz
eclipse.preferences.version=1
gradle.user.home=
java.home=/usr/local/sdkman/candidates/java/current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
connection.project.dir=..
connection.project.dir=../../../../lesson_02/quiz
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=javax.annotation.ParametersAreNonnullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
Expand All @@ -13,9 +13,9 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.source=17

0 comments on commit 054d516

Please sign in to comment.