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

Update Lesson2.java and Lesson3.java files #133

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions lesson_02/quiz/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=--init-script /root/.local/share/nvim/mason/packages/jdtls/config_linux/org.eclipse.osgi/55/0/.cp/gradle/init/init.gradle
auto.sync=false
arguments=--init-script /home/vscode/.vscode-server/data/User/globalStorage/redhat.java/1.28.1/config_linux/org.eclipse.osgi/55/0/.cp/gradle/init/init.gradle --init-script /home/vscode/.vscode-server/data/User/globalStorage/redhat.java/1.28.1/config_linux/org.eclipse.osgi/55/0/.cp/gradle/protobuf/init.gradle
auto.sync=true
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/root/.sdkman/candidates/java/17-open
java.home=/usr/local/sdkman/candidates/java/current
jvm.arguments=
offline.mode=false
override.workspace.settings=true
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=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.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.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=error
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
org.eclipse.jdt.core.compiler.problem.nullReference=warning
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.problem.nullSpecViolation=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.source=17
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.springframework.context.annotation.Configuration;

@Configuration
@SpringBootApplication(scanBasePackages = "com.codedifferently")
@SpringBootApplication (scanBasePackages = "com.codedifferently")
public class Lesson2 implements CommandLineRunner {

public static void main(String[] args) {
Expand Down 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,7 @@ 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.
}
}

Loading
Loading