@@ -2,15 +2,18 @@ import {
2
2
AnswerChoice ,
3
3
MultipleChoiceQuizQuestion ,
4
4
QuizPrinter ,
5
+ QuizQuestion ,
5
6
} from "codedifferently-instructional" ;
7
+
6
8
export class Lesson5 {
7
- run ( ) {
9
+ run ( ) : void {
8
10
const quizQuestions = Lesson5 . makeQuizQuestions ( ) ;
9
11
if ( ! quizQuestions ) throw new Error ( "Quiz questions cannot be null" ) ;
10
12
const printer = new QuizPrinter ( ) ;
11
13
printer . printQuiz ( quizQuestions ) ;
12
14
}
13
- static makeQuizQuestions ( ) {
15
+
16
+ static makeQuizQuestions ( ) : QuizQuestion [ ] {
14
17
return [
15
18
Lesson5 . makeQuestion0 ( ) ,
16
19
Lesson5 . makeQuestion1 ( ) ,
@@ -24,7 +27,8 @@ export class Lesson5 {
24
27
Lesson5 . makeQuestion9 ( ) ,
25
28
] ;
26
29
}
27
- static makeQuestion0 ( ) {
30
+
31
+ private static makeQuestion0 ( ) : QuizQuestion {
28
32
return new MultipleChoiceQuizQuestion (
29
33
0 ,
30
34
"What is the purpose of the <h1> tag in HTML?" ,
@@ -34,10 +38,11 @@ export class Lesson5 {
34
38
[ AnswerChoice . C , "To insert an image" ] ,
35
39
[ AnswerChoice . D , "To create a paragraph" ] ,
36
40
] ) ,
37
- AnswerChoice . B ,
41
+ AnswerChoice . UNANSWERED ,
38
42
) ;
39
43
}
40
- static makeQuestion1 ( ) {
44
+
45
+ private static makeQuestion1 ( ) : QuizQuestion {
41
46
return new MultipleChoiceQuizQuestion (
42
47
1 ,
43
48
"Which attribute is used to specify alternative text for an image in HTML?" ,
@@ -47,10 +52,11 @@ export class Lesson5 {
47
52
[ AnswerChoice . C , "alt" ] ,
48
53
[ AnswerChoice . D , "href" ] ,
49
54
] ) ,
50
- AnswerChoice . C ,
55
+ AnswerChoice . UNANSWERED ,
51
56
) ;
52
57
}
53
- static makeQuestion2 ( ) {
58
+
59
+ private static makeQuestion2 ( ) : QuizQuestion {
54
60
return new MultipleChoiceQuizQuestion (
55
61
2 ,
56
62
"Which HTML tag is used to create a hyperlink?" ,
@@ -60,10 +66,11 @@ export class Lesson5 {
60
66
[ AnswerChoice . C , "<div>" ] ,
61
67
[ AnswerChoice . D , "<link>" ] ,
62
68
] ) ,
63
- AnswerChoice . B ,
69
+ AnswerChoice . UNANSWERED ,
64
70
) ;
65
71
}
66
- static makeQuestion3 ( ) {
72
+
73
+ private static makeQuestion3 ( ) : QuizQuestion {
67
74
return new MultipleChoiceQuizQuestion (
68
75
3 ,
69
76
"Which of the following is a semantic HTML tag?" ,
@@ -73,10 +80,11 @@ export class Lesson5 {
73
80
[ AnswerChoice . C , "<span>" ] ,
74
81
[ AnswerChoice . D , "<br>" ] ,
75
82
] ) ,
76
- AnswerChoice . B ,
83
+ AnswerChoice . UNANSWERED ,
77
84
) ;
78
85
}
79
- static makeQuestion4 ( ) {
86
+
87
+ private static makeQuestion4 ( ) : QuizQuestion {
80
88
return new MultipleChoiceQuizQuestion (
81
89
4 ,
82
90
"What does CSS stand for?" ,
@@ -86,10 +94,11 @@ export class Lesson5 {
86
94
[ AnswerChoice . C , "Computer Style Sheets" ] ,
87
95
[ AnswerChoice . D , "Cascading System Sheets" ] ,
88
96
] ) ,
89
- AnswerChoice . B ,
97
+ AnswerChoice . UNANSWERED ,
90
98
) ;
91
99
}
92
- static makeQuestion5 ( ) {
100
+
101
+ private static makeQuestion5 ( ) : QuizQuestion {
93
102
return new MultipleChoiceQuizQuestion (
94
103
5 ,
95
104
"Which CSS property is used to change the text color?" ,
@@ -99,10 +108,11 @@ export class Lesson5 {
99
108
[ AnswerChoice . C , "text-color" ] ,
100
109
[ AnswerChoice . D , "background-color" ] ,
101
110
] ) ,
102
- AnswerChoice . B ,
111
+ AnswerChoice . UNANSWERED ,
103
112
) ;
104
113
}
105
- static makeQuestion6 ( ) {
114
+
115
+ private static makeQuestion6 ( ) : QuizQuestion {
106
116
return new MultipleChoiceQuizQuestion (
107
117
6 ,
108
118
"How do you add a comment in CSS?" ,
@@ -112,10 +122,11 @@ export class Lesson5 {
112
122
[ AnswerChoice . C , "/* this is a comment */" ] ,
113
123
[ AnswerChoice . D , "<!-- this is a comment -->" ] ,
114
124
] ) ,
115
- AnswerChoice . C ,
125
+ AnswerChoice . UNANSWERED ,
116
126
) ;
117
127
}
118
- static makeQuestion7 ( ) {
128
+
129
+ private static makeQuestion7 ( ) : QuizQuestion {
119
130
return new MultipleChoiceQuizQuestion (
120
131
7 ,
121
132
"Which CSS property controls the size of text?" ,
@@ -125,10 +136,11 @@ export class Lesson5 {
125
136
[ AnswerChoice . C , "text-size" ] ,
126
137
[ AnswerChoice . D , "text-style" ] ,
127
138
] ) ,
128
- AnswerChoice . B ,
139
+ AnswerChoice . UNANSWERED ,
129
140
) ;
130
141
}
131
- static makeQuestion8 ( ) {
142
+
143
+ private static makeQuestion8 ( ) : QuizQuestion {
132
144
return new MultipleChoiceQuizQuestion (
133
145
8 ,
134
146
"What is the default display value for `<div>` in CSS?" ,
@@ -138,10 +150,11 @@ export class Lesson5 {
138
150
[ AnswerChoice . C , "inline-block" ] ,
139
151
[ AnswerChoice . D , "none" ] ,
140
152
] ) ,
141
- AnswerChoice . B ,
153
+ AnswerChoice . UNANSWERED ,
142
154
) ;
143
155
}
144
- static makeQuestion9 ( ) {
156
+
157
+ private static makeQuestion9 ( ) : QuizQuestion {
145
158
return new MultipleChoiceQuizQuestion (
146
159
9 ,
147
160
"How do you link an external CSS file to an HTML document?" ,
@@ -151,11 +164,11 @@ export class Lesson5 {
151
164
[ AnswerChoice . C , "<stylesheet link='styles.css'>" ] ,
152
165
[ AnswerChoice . D , "<css href='styles.css'>" ] ,
153
166
] ) ,
154
- AnswerChoice . A ,
167
+ AnswerChoice . UNANSWERED ,
155
168
) ;
156
169
}
157
170
}
171
+
158
172
if ( ! process . env . JEST_WORKER_ID ) {
159
173
new Lesson5 ( ) . run ( ) ;
160
174
}
161
- //# sourceMappingURL=lesson5.js.map
0 commit comments