77import java .util .Map ;
88
99import com .codedifferently .instructional .quiz .MultipleChoiceQuizQuestion ;
10- import com .sun .org .apache .xpath .internal .operations .Mult ;
11-
10+ import com .codedifferently .instructional .quiz .MultipleChoiceQuestion ;
1211public class Lesson {
12+
13+ public static void main (String [] args ) {
14+ MultipleChoiceQuestion [] questions = makeQuestions ();
15+ for (MultipleChoiceQuestion q : questions ) {
16+ System .out .println (q );
17+ }
18+ }
19+
20+ public static MultipleChoiceQuestion [] makeQuestions () {
21+ MultipleChoiceQuestion [] questions = new MultipleChoiceQuestion [11 ];
22+ questions [0 ] = makeQuestion0 ();
23+ questions [1 ] = makeQuestion1 ();
24+ questions [2 ] = makeQuestion2 ();
25+ questions [3 ] = makeQuestion3 ();
26+ questions [4 ] = makeQuestion4 ();
27+ questions [5 ] = makeQuestion5 ();
28+ questions [6 ] = makeQuestion6 ();
29+ questions [7 ] = makeQuestion7 ();
30+ questions [8 ] = makeQuestion8 ();
31+ questions [9 ] = makeQuestion9 ();
32+ questions [10 ] = makeQuestion10 ();
33+
34+ return questions ;
35+ }
1336
1437
1538
@@ -19,6 +42,7 @@ public static MultipleChoiceQuestion makeQuestion0() {
1942 answerChoices .put (AnswerChoice .B , "To keep a record of changes over time" );
2043 answerChoices .put (AnswerChoice .C , " To delete unnecessary files" );
2144 answerChoices .put (AnswerChoice .D , "To run code more efficiently" );
45+
2246 return new MultipleChoiceQuizQuestion (
2347 0 ,"What is the main purpose of version control?" ,answerChoices ,AnswerChoice .B );
2448 }
@@ -29,6 +53,7 @@ public static MultipleChoiceQuestion makeQuestion1() {
2953 answerChoices .put (AnswerChoice .B , "A temporary backup of the code" );
3054 answerChoices .put (AnswerChoice .C , "A tool for merging branches" );
3155 answerChoices .put (AnswerChoice .D , "What is a fork in Git?" );
56+
3257 return new MultipleChoiceQuizQuestion (
3358 1 ,"What is the main purpose of version control?" ,answerChoices ,AnswerChoice .B );
3459 }
@@ -39,6 +64,7 @@ public static MultipleChoiceQuizQuestion makeQuestion2() {
3964 answerChoices .put (AnswerChoice .B , "Commit changes locally" );
4065 answerChoices .put (AnswerChoice .C , "Push changes to the server" );
4166 answerChoices .put (AnswerChoice .D , "Write code directly in GitHub" );
67+
4268 return new MultipleChoiceQuizQuestion (
4369 2 ,"Which of the following is NOT part of the basic Git workflow?" ,answerChoices ,AnswerChoice .D );
4470 }
@@ -48,6 +74,7 @@ public static MultipleChoiceQuizQuestion makeQuestion3() {
4874 answerChoices .put (AnswerChoice .B , "git merge" );
4975 answerChoices .put (AnswerChoice .C , "git branch" );
5076 answerChoices .put (AnswerChoice .D , "git pull" );
77+
5178 return new MultipleChoiceQuizQuestion (
5279 3 ,"What command is used to combine changes from different branches?" ,answerChoices ,AnswerChoice .B );
5380 }
@@ -58,6 +85,7 @@ public static MultipleChoiceQuizQuestion makeQuestion4() {
5885 answerChoices .put (AnswerChoice .B , "IntelliJ IDEA" );
5986 answerChoices .put (AnswerChoice .C , "NetBeans" );
6087 answerChoices .put (AnswerChoice .D , "VS Code" );
88+
6189 return new MultipleChoiceQuizQuestion (
6290 4 ,"Which IDE is being used in the class?" ,answerChoices ,AnswerChoice .D );
6391 }
@@ -68,10 +96,11 @@ public static MultipleChoiceQuizQuestion makeQuestion5() {
6896 answerChoices .put (AnswerChoice .B , "Debugger" );
6997 answerChoices .put (AnswerChoice .C , "Dev Containers" );
7098 answerChoices .put (AnswerChoice .D , "Source Control" );
99+
71100 return new MultipleChoiceQuizQuestion (
72101 5 ,"What feature allows developers to work from the same pre-configured environment in VS Code?" ,answerChoices ,AnswerChoice .C );
73102 }
74- static makeQuestion6 () {
103+ public static MultipleChoiceQuizQuestion makeQuestion6 () {
75104 Map <AnswerChoice , String > answerChoices = new HashMap <>();
76105 answerChoices .put (AnswerChoice .A , "Editing and refactoring code" );
77106 answerChoices .put (AnswerChoice .B , "Browsing code" );
@@ -82,42 +111,44 @@ static makeQuestion6() {
82111 return new MultipleChoiceQuizQuestion (
83112 6 ,"What is NOT a reason for using an IDE?" ,answerChoices ,AnswerChoice .C );
84113 }
85- static makeQuestion7 () {
114+ public static MultipleChoiceQuizQuestion makeQuestion7 () {
86115 Map <AnswerChoice , String > answerChoices = new HashMap <>();
87116 answerChoices .put (AnswerChoice .A , "pwd" );
88117 answerChoices .put (AnswerChoice .B , "ls" );
89118 answerChoices .put (AnswerChoice .C , "cd" );
90119 answerChoices .put (AnswerChoice .D , "mkdir" );
120+
91121 return new MultipleChoiceQuizQuestion (
92122 7 ,"Which command is used to print the current working directory in the terminal?" ,answerChoices ,AnswerChoice .A );
93123 }
94- static makeQuestion8 () {
124+ public static MultipleChoiceQuizQuestion makeQuestion8 () {
95125 Map <AnswerChoice , String > answerChoices = new HashMap <>();
96126 answerChoices .put (AnswerChoice .A , "pwd" );
97127 answerChoices .put (AnswerChoice .B , "ls" );
98128 answerChoices .put (AnswerChoice .C , "cd" );
99129 answerChoices .put (AnswerChoice .D , "mkdir" );
130+
100131 return new MultipleChoiceQuizQuestion (
101132 8 ,"Which command is used to change directories in the terminal?" ,answerChoices ,AnswerChoice .C );
102133 }
103- static makeQuestion9 () {
134+ public static MultipleChoiceQuizQuestion makeQuestion9 () {
104135
105136 Map <AnswerChoice , String > answerChoices = new HashMap <>();
106137 answerChoices .put (AnswerChoice .A , "Change file or directory permissions" );
107138 answerChoices .put (AnswerChoice .B , "List files in a directory" );
108139 answerChoices .put (AnswerChoice .C , "Remove a file or directory" );
109140 answerChoices .put (AnswerChoice .D , "Copy a file or directory" );
141+
110142 return new MultipleChoiceQuizQuestion (
111143 9 ,"What does the command `chmod` do?" ,answerChoices ,AnswerChoice .A );
112144
113145 }
114- static makeQuestion10 () {
115-
146+ public static MultipleChoiceQuizQuestion makeQuestion10 () {
116147 Map <AnswerChoice , String > answerChoices = new HashMap <>();
117148 answerChoices .put (AnswerChoice .A , "⌘ + Shift + T" );
118- answerChoices .put (AnswerChoice .B , ' ⌘ + Spacebar, then type " terminal"' );
149+ answerChoices .put (AnswerChoice .B , " ⌘ + Spacebar, then type terminal" );
119150 answerChoices .put (AnswerChoice .C , "⌘ + Q" );
120- answerChoices .put (AnswerChoice .D , ' ⌘ + S, then type " terminal"' );
151+ answerChoices .put (AnswerChoice .D , " ⌘ + S, then type terminal" );
121152
122153
123154 return new MultipleChoiceQuizQuestion (
0 commit comments