Skip to content

Commit a266282

Browse files
committed
I have created a new branch adding in Homework 3 because of a merge bug on my last branch
1 parent 9f4034b commit a266282

File tree

3 files changed

+68
-2
lines changed

3 files changed

+68
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ quiz:
1010
- $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342
1111
- $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0.
1212
- $2y$10$JXoeInFy4UzHhi2Lskxzeu7CQ9RprnJgBw9pjAlV.t6zQyJTyy8OK
13+
dylanlafferty:
14+
- $2y$10$acRuI5XyFjj4PLpl3d1xd.ZEG2MsPUpw0aFoP/CmEx14fEhdmxP1i
15+
- $2y$10$E9m5ekFKcrlyQkURGQNaaOPbu8sBn5fDRWEqUbGvuB8oLIhYLufn2
16+
- $2y$10$ppMDrfmIXbKcj/D6tuLL0uSAzyevGD8bm2PnqriSdKh81iBiRfUlS
1317
mercedesmathews:
1418
- $2y$10$hRwUbEYSqz761B.cG79T2uYsYPiEtKu.JgD3Aj7.Mofx27TtX5YHa
1519
- $2y$10$qE/gXxpq62FEGJOJd9MDA.vpDYLTNSsZbqZLpD/0368CKkcNBzW1y
1620
- $2y$10$yI/2BgOyqQfLdHM3ixPE5uLu89su/sHRJB2c5szDFIAYXDhRakS.C
1721
rmill:
1822
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
1923
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
20-
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
24+
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class DylanLaffertyQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'dylanlafferty';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
DylanLaffertyQuiz.makeQuestion0(),
16+
DylanLaffertyQuiz.makeQuestion1(),
17+
DylanLaffertyQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the Power supply unit most compared to when comparing it to a human body?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Heart'],
27+
[AnswerChoice.B, 'Arm'],
28+
[AnswerChoice.C, 'Leg'],
29+
[AnswerChoice.D, 'Brain'],
30+
]),
31+
AnswerChoice.A,
32+
);
33+
}
34+
private static makeQuestion1(): QuizQuestion {
35+
return new MultipleChoiceQuizQuestion(
36+
1,
37+
'What is the full name of CPU?',
38+
new Map<AnswerChoice, string>([
39+
[AnswerChoice.A, 'Central Place Unit'],
40+
[AnswerChoice.B, 'Certified Processing Unit'],
41+
[AnswerChoice.C, 'Central Processing Unit'],
42+
[AnswerChoice.D, 'Configured Procerdale Unicode'],
43+
]),
44+
AnswerChoice.C,
45+
);
46+
}
47+
48+
private static makeQuestion2(): QuizQuestion {
49+
return new MultipleChoiceQuizQuestion(
50+
2,
51+
'What is used to keep Short term memory in a computer?',
52+
new Map<AnswerChoice, string>([
53+
[AnswerChoice.A, 'Hard Drive'],
54+
[AnswerChoice.B, 'SSD'],
55+
[AnswerChoice.C, 'GPU'],
56+
[AnswerChoice.D, 'RAM'],
57+
]),
58+
AnswerChoice.D,
59+
);
60+
}
61+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { DylanLaffertyQuiz } from './dylan_lafferty_quiz.js';
45
import { Jbeyquiz } from './jbeyquiz.js';
56
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
67
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
78

89
export const Quizzes = Symbol.for('Quizzes');
910

10-
// Add your quiz provider here.
1111
const QUIZ_PROVIDERS = [
1212
AnthonyMaysQuiz,
1313
AnotherQuiz,
1414
MercedesMathewsQuiz,
1515
Jbeyquiz,
16+
DylanLaffertyQuiz,
1617
RasheedMillerQuiz,
1718
];
1819

0 commit comments

Comments
 (0)