Skip to content

Commit 5ddb19e

Browse files
committed
lesson03
1 parent 9f4034b commit 5ddb19e

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ quiz:
1717
rmill:
1818
- $2y$10$FquR69q7W4E68TX/SNCB7u8Ri0DOFRDqsUPdGfuyIBjZJRVFkNI.6
1919
- $2y$10$FSWRA7hulVpyVxd8s67Nxuq/1cdmviW24qqoUbqihBf79cR.w9yly
20-
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
20+
- $2y$10$Qy1IsNsfuJvA384ypL/72uWubUuNbMRp4LD6j/LM0RIH66D/HIjF6
21+
jasonwatson:
22+
- $2y$10$AZtPKyQ.6Bzb.jreO/u.2O3C7XfvYAVpjHzLkuhLVdsX74wc4vXwS
23+
- $2y$10$QbKtEXqpeItigRLAHsn8Qe/06ZpXhKEP1bGPJSFXymsoFw9.04NHy
24+
- $2y$10$tJLScW1OZpOLpVllM65EI.W1QjkSIIBtz.KG8z/s.07RNb7ZWC0um
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class JasonWatsonQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'jasonwatson';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
JasonWatsonQuiz.makeQuestion0(),
16+
JasonWatsonQuiz.makeQuestion1(),
17+
JasonWatsonQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'How much MB of memory is equal to 1GB of RAM',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, '500MB'],
27+
[AnswerChoice.B, '1024MB'],
28+
[AnswerChoice.C, '2048MB'],
29+
[AnswerChoice.D, '1000MB'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is Visual Studio Code primarily used for',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Graphic Design'],
41+
[AnswerChoice.B, 'Word Processing'],
42+
[AnswerChoice.C, 'Code Editing'],
43+
[AnswerChoice.D, 'Video Prodection'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'What file is commonly used to provide instructions or documenttation in a GitHub repository',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'README.md'],
55+
[AnswerChoice.B, 'INSTRUCTIONS.txt'],
56+
[AnswerChoice.C, 'GUIDE.pdf'],
57+
[AnswerChoice.D, 'DOCS.docx'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { JasonWatsonQuiz } from './jason_watson_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

9+
810
export const Quizzes = Symbol.for('Quizzes');
911

1012
// Add your quiz provider here.
@@ -14,6 +16,7 @@ const QUIZ_PROVIDERS = [
1416
MercedesMathewsQuiz,
1517
Jbeyquiz,
1618
RasheedMillerQuiz,
19+
JasonWatsonQuiz,
1720
];
1821

1922
@Module({

0 commit comments

Comments
 (0)