Skip to content

Created quiz questions #113

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
merged 6 commits into from
Oct 2, 2024
Merged
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
56 changes: 56 additions & 0 deletions lesson_03/quiz/src/quizzes/shawn_dunsmore_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class ShawnDunsmoreQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'shawndunsmore';
}

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

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is Davids Favorite?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'Idc'],
[AnswerChoice.B, 'Blue'],
[AnswerChoice.C, 'Black'],
[AnswerChoice.D, 'Whatever you think it is.'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new QuizQuestion(
1,
'What is Jordan famous for?',
'Pickle ball champion',
); // Provide an answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'How mnay states are there?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, '50'],
[AnswerChoice.B, '35'],
[AnswerChoice.C, '20'],
[AnswerChoice.D, '65'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}