Skip to content

Homework 03 - First Submission #119

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

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ quiz:
- $2y$10$hRwUbEYSqz761B.cG79T2uYsYPiEtKu.JgD3Aj7.Mofx27TtX5YHa
- $2y$10$qE/gXxpq62FEGJOJd9MDA.vpDYLTNSsZbqZLpD/0368CKkcNBzW1y
- $2y$10$yI/2BgOyqQfLdHM3ixPE5uLu89su/sHRJB2c5szDFIAYXDhRakS.C
davidadenaike:
- $2y$10$CCxBimjXsumkjTLWRWqibue0VeGel6Idfb/2q3y.mIuKHbkWVTsx6
- $2y$10$/z0Ri9Fg7pOXUFYsOErj.Ol8Hxcy7zwqWezLTMWVtFv6tzvkCrJti
- $2y$10$vQD1oc2OqiE1PkirdjQ/xu3sbrnJjwImPEwvCmP7Uk0Z1PDqQ0Mq.
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/david_adenaike_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class DavidAdenaikeQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'davidadenaike';
}

makeQuizQuestions(): QuizQuestion[] {
return [
DavidAdenaikeQuiz.makeQuestion0(),
DavidAdenaikeQuiz.makeQuestion1(),
DavidAdenaikeQuiz.makeQuestion2(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What does RAM stand for?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Rabbit, Abandon, Machinery'],
[AnswerChoice.B, 'Race, Abbey, Magazine'],
[AnswerChoice.C, 'Racism, Able, Magnetic'],
[AnswerChoice.D, 'Random, Access Memory'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'What does CPU stand for?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Central, Processing, Unit'],
[AnswerChoice.B, 'Cabin, Pace, Umbrella'],
[AnswerChoice.C, 'Cable, Pack, Unanimous'],
[AnswerChoice.D, 'Cage, Pain, Uncle'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What does GPU stand for?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Galaxy, Palace, Unpleasant'],
[AnswerChoice.B, 'Graphics, Processing, Unit'],
[AnswerChoice.C, 'Gallon, Panic, Unrest'],
[AnswerChoice.D, 'Game, Parachute, Union'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}
2 changes: 2 additions & 0 deletions lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { AnotherQuiz } from './another_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { Jbeyquiz } from './jbeyquiz.js';
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';

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

Expand All @@ -12,6 +13,7 @@ const QUIZ_PROVIDERS = [
AnotherQuiz,
MercedesMathewsQuiz,
Jbeyquiz,
DavidAdenaikeQuiz,
];

@Module({
Expand Down