Skip to content

Commit f57a5ec

Browse files
feat:lesson_03 assignment complete
1 parent 051c111 commit f57a5ec

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
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 ThomasBoyleQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'thomasboyle';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
ThomasBoyleQuiz.makeQuestion0(),
16+
ThomasBoyleQuiz.makeQuestion1(),
17+
ThomasBoyleQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What is the "brain" of a computer?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'The GPU'],
27+
[AnswerChoice.B, 'The RAM'],
28+
[AnswerChoice.C, 'The power supply'],
29+
[AnswerChoice.D, 'The CPU'],
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 does the terminal allow its user to do?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Obtain cookies'],
41+
[AnswerChoice.B, 'Pledge allegience to the dark side'],
42+
[
43+
AnswerChoice.C,
44+
'Access and modify files and permmisions in a given directory',
45+
],
46+
[AnswerChoice.D, 'Download more RAM'],
47+
]),
48+
AnswerChoice.UNANSWERED,
49+
); // Replace `UNANSWERED` with the correct answer.
50+
}
51+
52+
private static makeQuestion2(): QuizQuestion {
53+
return new MultipleChoiceQuizQuestion(
54+
1,
55+
'Which of these commands is not a git command?',
56+
new Map<AnswerChoice, string>([
57+
[AnswerChoice.A, 'git good'],
58+
[AnswerChoice.B, 'git commit'],
59+
[AnswerChoice.C, 'git push'],
60+
[AnswerChoice.D, 'git pull'],
61+
]),
62+
AnswerChoice.UNANSWERED,
63+
); // Replace `UNANSWERED` with the correct answer.
64+
}
65+
}

0 commit comments

Comments
 (0)