66import java .util .HashMap ;
77import java .util .Map ;
88
9+ import com .codedifferently .instructional .quiz .AnswerChoice ;
910import com .codedifferently .instructional .quiz .MultipleChoiceQuizQuestion ;
10- import com . codedifferently . instructional . quiz . MultipleChoiceQuestion ;
11+
1112public class Lesson {
1213
1314 public static void main (String [] args ) {
14- MultipleChoiceQuestion [] questions = makeQuestions ();
15- for ( MultipleChoiceQuestion q : questions ) {
15+ MultipleChoiceQuizQuestion [] questions = makeQuestions ();
16+ for ( MultipleChoiceQuizQuestion q : questions ) {
1617 System .out .println (q );
1718 }
1819 }
1920
20- public static MultipleChoiceQuestion [] makeQuestions () {
21- MultipleChoiceQuestion [] questions = new MultipleChoiceQuestion [11 ];
21+ public static MultipleChoiceQuizQuestion [] makeQuestions () {
22+ MultipleChoiceQuizQuestion [] questions = new MultipleChoiceQuizQuestion [11 ];
2223 questions [0 ] = makeQuestion0 ();
2324 questions [1 ] = makeQuestion1 ();
2425 questions [2 ] = makeQuestion2 ();
@@ -33,30 +34,28 @@ public static MultipleChoiceQuestion[] makeQuestions() {
3334
3435 return questions ;
3536 }
36-
3737
38-
39- public static MultipleChoiceQuestion makeQuestion0 () {
38+ public static MultipleChoiceQuizQuestion makeQuestion0 () {
4039 Map <AnswerChoice , String > answerChoices = new HashMap <>();
4140 answerChoices .put (AnswerChoice .A , "To make backups of files" );
4241 answerChoices .put (AnswerChoice .B , "To keep a record of changes over time" );
4342 answerChoices .put (AnswerChoice .C , " To delete unnecessary files" );
4443 answerChoices .put (AnswerChoice .D , "To run code more efficiently" );
4544
4645 return new MultipleChoiceQuizQuestion (
47- 0 ,"What is the main purpose of version control?" ,answerChoices ,AnswerChoice .B );
46+ 0 , "What is the main purpose of version control?" , answerChoices , AnswerChoice .B );
4847 }
4948
50- public static MultipleChoiceQuestion makeQuestion1 () {
51- Map <AnswerChoice , String > answerChoices = new HashMap <>();
49+ public static MultipleChoiceQuizQuestion makeQuestion1 () {
50+ Map <AnswerChoice , String > answerChoices = new HashMap <>();
5251 answerChoices .put (AnswerChoice .A , "A duplicate copy of a repository that you own and modify" );
5352 answerChoices .put (AnswerChoice .B , "A temporary backup of the code" );
5453 answerChoices .put (AnswerChoice .C , "A tool for merging branches" );
5554 answerChoices .put (AnswerChoice .D , "What is a fork in Git?" );
5655
5756 return new MultipleChoiceQuizQuestion (
58- 1 ,"What is the main purpose of version control ?" ,answerChoices ,AnswerChoice .B );
59- }
57+ 1 , "What is a fork in Git ?" , answerChoices , AnswerChoice .A );
58+ }
6059
6160 public static MultipleChoiceQuizQuestion makeQuestion2 () {
6261 Map <AnswerChoice , String > answerChoices = new HashMap <>();
@@ -66,8 +65,9 @@ public static MultipleChoiceQuizQuestion makeQuestion2() {
6665 answerChoices .put (AnswerChoice .D , "Write code directly in GitHub" );
6766
6867 return new MultipleChoiceQuizQuestion (
69- 2 ,"Which of the following is NOT part of the basic Git workflow?" ,answerChoices ,AnswerChoice .D );
68+ 2 , "Which of the following is NOT part of the basic Git workflow?" , answerChoices , AnswerChoice .D );
7069 }
70+
7171 public static MultipleChoiceQuizQuestion makeQuestion3 () {
7272 Map <AnswerChoice , String > answerChoices = new HashMap <>();
7373 answerChoices .put (AnswerChoice .A , "git commit" );
@@ -76,7 +76,7 @@ public static MultipleChoiceQuizQuestion makeQuestion3() {
7676 answerChoices .put (AnswerChoice .D , "git pull" );
7777
7878 return new MultipleChoiceQuizQuestion (
79- 3 ,"What command is used to combine changes from different branches?" ,answerChoices ,AnswerChoice .B );
79+ 3 , "What command is used to combine changes from different branches?" , answerChoices , AnswerChoice .B );
8080 }
8181
8282 public static MultipleChoiceQuizQuestion makeQuestion4 () {
@@ -87,7 +87,7 @@ public static MultipleChoiceQuizQuestion makeQuestion4() {
8787 answerChoices .put (AnswerChoice .D , "VS Code" );
8888
8989 return new MultipleChoiceQuizQuestion (
90- 4 ,"Which IDE is being used in the class?" ,answerChoices ,AnswerChoice .D );
90+ 4 , "Which IDE is being used in the class?" , answerChoices , AnswerChoice .D );
9191 }
9292
9393 public static MultipleChoiceQuizQuestion makeQuestion5 () {
@@ -98,62 +98,65 @@ public static MultipleChoiceQuizQuestion makeQuestion5() {
9898 answerChoices .put (AnswerChoice .D , "Source Control" );
9999
100100 return new MultipleChoiceQuizQuestion (
101- 5 ,"What feature allows developers to work from the same pre-configured environment in VS Code?" ,answerChoices ,AnswerChoice .C );
101+ 5 , "What feature allows developers to work from the same pre-configured environment in VS Code?" , answerChoices , AnswerChoice .C );
102102 }
103- public static MultipleChoiceQuizQuestion makeQuestion6 () {
103+
104+ public static MultipleChoiceQuizQuestion makeQuestion6 () {
104105 Map <AnswerChoice , String > answerChoices = new HashMap <>();
105- answerChoices .put (AnswerChoice .A , "Editing and refactoring code" );
106- answerChoices .put (AnswerChoice .B , "Browsing code" );
107- answerChoices .put (AnswerChoice .C , "Playing music" );
108- answerChoices .put (AnswerChoice .D , "Managing source control" );
109-
106+ answerChoices .put (AnswerChoice .A , "Editing and refactoring code" );
107+ answerChoices .put (AnswerChoice .B , "Browsing code" );
108+ answerChoices .put (AnswerChoice .C , "Playing music" );
109+ answerChoices .put (AnswerChoice .D , "Managing source control" );
110110
111111 return new MultipleChoiceQuizQuestion (
112- 6 ,"What is NOT a reason for using an IDE?" ,answerChoices ,AnswerChoice .C );
112+ 6 , "What is NOT a reason for using an IDE?" , answerChoices , AnswerChoice .C );
113113 }
114+
114115 public static MultipleChoiceQuizQuestion makeQuestion7 () {
115116 Map <AnswerChoice , String > answerChoices = new HashMap <>();
116- answerChoices .put (AnswerChoice .A , "pwd" );
117- answerChoices .put (AnswerChoice .B , "ls" );
118- answerChoices .put (AnswerChoice .C , "cd" );
119- answerChoices .put (AnswerChoice .D , "mkdir" );
117+ answerChoices .put (AnswerChoice .A , "pwd" );
118+ answerChoices .put (AnswerChoice .B , "ls" );
119+ answerChoices .put (AnswerChoice .C , "cd" );
120+ answerChoices .put (AnswerChoice .D , "mkdir" );
120121
121122 return new MultipleChoiceQuizQuestion (
122- 7 ,"Which command is used to print the current working directory in the terminal?" ,answerChoices ,AnswerChoice .A );
123+ 7 , "Which command is used to print the current working directory in the terminal?" , answerChoices , AnswerChoice .A );
123124 }
124- public static MultipleChoiceQuizQuestion makeQuestion8 () {
125+
126+ public static MultipleChoiceQuizQuestion makeQuestion8 () {
125127 Map <AnswerChoice , String > answerChoices = new HashMap <>();
126- answerChoices .put (AnswerChoice .A , "pwd" );
127- answerChoices .put (AnswerChoice .B , "ls" );
128- answerChoices .put (AnswerChoice .C , "cd" );
129- answerChoices .put (AnswerChoice .D , "mkdir" );
128+ answerChoices .put (AnswerChoice .A , "pwd" );
129+ answerChoices .put (AnswerChoice .B , "ls" );
130+ answerChoices .put (AnswerChoice .C , "cd" );
131+ answerChoices .put (AnswerChoice .D , "mkdir" );
130132
131133 return new MultipleChoiceQuizQuestion (
132- 8 ,"Which command is used to change directories in the terminal?" ,answerChoices ,AnswerChoice .C );
134+ 8 , "Which command is used to change directories in the terminal?" , answerChoices , AnswerChoice .C );
133135 }
134- public static MultipleChoiceQuizQuestion makeQuestion9 () {
136+
137+ public static MultipleChoiceQuizQuestion makeQuestion9 () {
135138
136139 Map <AnswerChoice , String > answerChoices = new HashMap <>();
137- answerChoices .put (AnswerChoice .A , "Change file or directory permissions" );
138- answerChoices .put (AnswerChoice .B , "List files in a directory" );
139- answerChoices .put (AnswerChoice .C , "Remove a file or directory" );
140- answerChoices .put (AnswerChoice .D , "Copy a file or directory" );
140+ answerChoices .put (AnswerChoice .A , "Change file or directory permissions" );
141+ answerChoices .put (AnswerChoice .B , "List files in a directory" );
142+ answerChoices .put (AnswerChoice .C , "Remove a file or directory" );
143+ answerChoices .put (AnswerChoice .D , "Copy a file or directory" );
141144
142- return new MultipleChoiceQuizQuestion (
143- 9 ,"What does the command `chmod` do?" ,answerChoices ,AnswerChoice .A );
145+ return new MultipleChoiceQuizQuestion (
146+ 9 , "What does the command `chmod` do?" , answerChoices , AnswerChoice .A );
144147
145148 }
146- public static MultipleChoiceQuizQuestion makeQuestion10 () {
147- Map <AnswerChoice , String > answerChoices = new HashMap <>();
148- answerChoices .put (AnswerChoice .A , "⌘ + Shift + T" );
149- answerChoices .put (AnswerChoice .B , "⌘ + Spacebar, then type terminal" );
150- answerChoices .put (AnswerChoice .C , "⌘ + Q" );
151- answerChoices .put (AnswerChoice .D , "⌘ + S, then type terminal" );
152149
150+ public static MultipleChoiceQuizQuestion makeQuestion10 () {
151+ Map <AnswerChoice , String > answerChoices = new HashMap <>();
152+ answerChoices .put (AnswerChoice .A , "⌘ + Shift + T" );
153+ answerChoices .put (AnswerChoice .B , "⌘ + Spacebar, then type terminal" );
154+ answerChoices .put (AnswerChoice .C , "⌘ + Q" );
155+ answerChoices .put (AnswerChoice .D , "⌘ + S, then type terminal" );
153156
154- return new MultipleChoiceQuizQuestion (
155- 10 ,"What is the shortcut for getting to the Mac terminal?" ,answerChoices ,AnswerChoice .B );
157+ return new MultipleChoiceQuizQuestion (
158+ 10 , "What is the shortcut for getting to the Mac terminal?" , answerChoices , AnswerChoice .B );
156159
157160 }
158161
159- }
162+ }
0 commit comments