Skip to content

Commit d95e1d6

Browse files
Meiko-S22DavisD251
authored andcommitted
feat: adds Meiko's quiz (code-differently#115)
* my quiz completed * Update quizzes.module.ts * Update quizzes.module.ts * Update quizzes.module.ts * Update quizzes.module.ts * Update quizzes.module.ts * Updated my quiz
1 parent 6f8af73 commit d95e1d6

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
meikostephens:
10+
- $2y$10$AD1YHmrZZivus7DoM91UMuErNnpi63ueluFs7DcSQSrZbXwDycAOi
11+
- $2y$10$KvnxAYKh3A151RyOOFtOv.wfImRzZMgbBgKy3gyLd1uUSSjHaN.4u
12+
- $2y$10$qJDpo1X1kFXRD1M6Kpi8WeKg.a8dgzd8RawXX/3RuMqM82biBc6iK
913
computerparts:
1014
- $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342
1115
- $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class MeikoStephensQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'meikostephens';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
MeikoStephensQuiz.makeQuestion0(),
16+
MeikoStephensQuiz.makeQuestion1(),
17+
MeikoStephensQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is a branch?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'A new line of code'],
27+
[
28+
AnswerChoice.B,
29+
'A copy of a repository that allows you make changes and merge them later',
30+
],
31+
[AnswerChoice.C, 'A way to delete a respository and start over'],
32+
[AnswerChoice.D, 'A way to run code'],
33+
]),
34+
AnswerChoice.UNANSWERED,
35+
); // Replace `UNANSWERED` with the correct answer.
36+
}
37+
38+
private static makeQuestion1(): QuizQuestion {
39+
return new MultipleChoiceQuizQuestion(
40+
1,
41+
'What does a syncfork do?',
42+
new Map<AnswerChoice, string>([
43+
[AnswerChoice.A, 'Updates changes from the original repository'],
44+
[AnswerChoice.B, 'Deletes the repositiory'],
45+
[AnswerChoice.C, 'Transforms the repository into a branch'],
46+
[AnswerChoice.D, 'Runs the code more efficiently'],
47+
]),
48+
AnswerChoice.UNANSWERED,
49+
); // Replace `UNANSWERED` with the correct answer.
50+
}
51+
52+
private static makeQuestion2(): QuizQuestion {
53+
return new MultipleChoiceQuizQuestion(
54+
2,
55+
'What brings the modify changes to merge into the main repositiory?',
56+
new Map<AnswerChoice, string>([
57+
[AnswerChoice.A, 'A terminal'],
58+
[AnswerChoice.B, 'A branch'],
59+
[AnswerChoice.C, 'A syncfork'],
60+
[AnswerChoice.D, 'A pull request'],
61+
]),
62+
AnswerChoice.UNANSWERED,
63+
); // Replace `UNANSWERED` with the correct answer.
64+
}
65+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
45
import { Jbeyquiz } from './jbeyquiz.js';
56
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
67
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
@@ -11,7 +12,8 @@ export const Quizzes = Symbol.for('Quizzes');
1112
// Add your quiz provider here.
1213
const QUIZ_PROVIDERS = [
1314
AnthonyMaysQuiz,
14-
AnotherQuiz,
15+
AnotherQuiz,
16+
MeikoStephensQuiz ,
1517
MercedesMathewsQuiz,
1618
Jbeyquiz,
1719
RasheedMillerQuiz,

0 commit comments

Comments
 (0)