You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Java port of the Lesson 02 quiz application, originally written in TypeScript. It demonstrates the same quiz functionality using the `codedifferently-instructional` Java library.
4
+
5
+
## Features
6
+
7
+
- 11 multiple choice questions covering:
8
+
- Version control and Git concepts
9
+
- IDE and development environment topics
10
+
- Terminal/command line basics
11
+
- Mac-specific shortcuts
12
+
13
+
## Prerequisites
14
+
15
+
- Java 21 or later
16
+
- Gradle (included via wrapper)
17
+
18
+
## Building and Running
19
+
20
+
### Build the project
21
+
```bash
22
+
./gradlew build
23
+
```
24
+
25
+
### Run the quiz
26
+
```bash
27
+
./gradlew run
28
+
```
29
+
30
+
### Run tests
31
+
```bash
32
+
./gradlew test
33
+
```
34
+
35
+
## Project Structure
36
+
37
+
-`app/src/main/java/quiz_java/Lesson2.java` - Main quiz implementation
38
+
-`app/src/main/java/quiz_java/App.java` - Application entry point
39
+
-`app/src/test/java/quiz_java/Lesson2Test.java` - Unit tests
40
+
-`app/build.gradle.kts` - Build configuration
41
+
-`settings.gradle.kts` - Multi-project settings
42
+
43
+
## Dependencies
44
+
45
+
This project uses the `codedifferently-instructional` library located at `../../lib/java/codedifferently-instructional/instructional-lib` which provides:
46
+
47
+
-`AnswerChoice` enum for multiple choice options
48
+
-`MultipleChoiceQuizQuestion` class for question representation
49
+
-`QuizPrinter` class for displaying the quiz
50
+
-`QuizQuestion` base class
51
+
52
+
## Quiz Questions
53
+
54
+
The Java implementation contains the same 11 questions as the TypeScript version:
55
+
56
+
1.**Question 0**: Version control purpose → Answer: B (To keep a record of changes over time)
57
+
2.**Question 1**: Git fork definition → Answer: A (A duplicate copy of a repository that you own and modify)
58
+
3.**Question 2**: Non-Git workflow activity → Answer: D (Write code directly in GitHub)
59
+
4.**Question 3**: Branch merging command → Answer: B (git merge)
60
+
5.**Question 4**: Class IDE → Answer: D (VS Code)
61
+
6.**Question 5**: VS Code environment feature → Answer: C (Dev Containers)
62
+
7.**Question 6**: Non-IDE purpose → Answer: C (Playing music)
63
+
8.**Question 7**: Directory listing command → Answer: B (ls)
64
+
9.**Question 8**: Directory change command → Answer: C (cd)
65
+
10.**Question 9**: chmod command purpose → Answer: A (Change file or directory permissions)
66
+
11.**Question 10**: Mac terminal shortcut → Answer: B (⌘ + Spacebar, then type "terminal")
67
+
68
+
## Notes
69
+
70
+
This Java port maintains the same structure and answers as the original TypeScript quiz while leveraging the Java ecosystem and demonstrating cross-language compatibility.
* This file was generated by the Gradle 'init' task.
3
+
*
4
+
* This generated file contains a sample Java application project to get you started.
5
+
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.8/userguide/building_java_projects.html in the Gradle documentation.
6
+
*/
7
+
8
+
plugins {
9
+
// Apply the application plugin to add support for building a CLI application in Java.
0 commit comments