Skip to content

Commit 2dee3d4

Browse files
committed
improvement of instructions to implement a new exercise
* improve instructions to implement a new exercise * improve description
1 parent 11cbe90 commit 2dee3d4

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

reference/implementing-a-concept-exercise.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,40 @@ languages
6060

6161
## Step 1: Add code files
6262

63-
The configuration files may be copied from another exercise. We aim to keep these in sync:
63+
The configuration files may be copied from another exercise. We aim to keep these in sync. We suggest to use:
6464

65-
- `build.gradle`
65+
- `languages/java/exercises/concept/basics/build.gradle`
6666

6767
Now create the following three files:
6868

6969
- `src/main/java/<slug>.java`. the stub implementation file, which is the starting point for students to work on the exercise.
70-
- `src/test/java/<slug>Test.java`: the test suite.
70+
- `src/test/java/<slug>Test.java`: the test suite, please use `assertj` to describe assertions instead of those offered by JUnit.
7171
- `.meta/example/src/main/java/<slug>.java`: an example implementation that passes all the tests.
7272

73-
## Step 2: Add documentation files
73+
Append to `languages/java/exercises/settings.gradle` the following line: `concept:<slug>`
74+
75+
## Step 2: Validate the solution
76+
77+
Before submitting your solution, be sure it works following these two steps from the folder of your exercise:
78+
79+
1. Test the solution running `gradle test`
80+
2. Validate the coding style running `gradle check`
81+
82+
## Step 3: Add documentation files
7483

7584
How to create the files common to all tracks is described in the [how to implement a concept exercise document][how-to-implement-a-concept-exercise].
7685

77-
## Step 3: Update list of implemented exercises
86+
## Step 4: Update list of implemented exercises
7887

7988
- Add the exercise to the [list of implemented exercises][implemented-exercises].
8089

81-
## Step 4: Add analyzer (optional)
90+
## Step 5: Add analyzer (optional)
8291

8392
Some exercises could benefit from having an exercise-specific [analyzer][analyzer]. If so, specify what analysis rules should be applied to this exercise and why.
8493

8594
_Skip this step if you're not sure what to do._
8695

87-
## Step 5: Add representation (optional)
96+
## Step 6: Add representation (optional)
8897

8998
Some exercises could benefit from having an custom representation as generated by the [Java representer][representer]. If so, specify what changes to the representation should be applied and why.
9099

0 commit comments

Comments
 (0)