Skip to content

Commit 100cc89

Browse files
committed
add the design.md for the jedliksToyCar
1 parent 180525c commit 100cc89

File tree

1 file changed

+16
-0
lines changed
  • exercises/concept/jedliks-toy-car/.meta

1 file changed

+16
-0
lines changed

exercises/concept/jedliks-toy-car/.meta/design.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,19 @@
2828
- `strings`: know how to do basic string interpolation.
2929
- `numbers`: know how to compare numbers.
3030
- `conditionals`: know how to do conditional logic.
31+
-
32+
## Analyzer
33+
34+
This exercise could benefit from the following rules in the [analyzer]:
35+
36+
- `essential`: Verify that the solution keeps the void type for the drive function.
37+
- `essential`: Verify that the solution has the fields in the class for battery percentage and the driving distance.
38+
- `essential`: Verify that the solution updates the variables in the drive method.
39+
- `essential`: Verify that the solution is not updating values when the battery is empty.
40+
- `actionable`: If the solution defines the fields as `public`, instruct the student to use `private` and explain the encapsulation principle.
41+
- `informative`: If the solution does not use a primitive as a type for the fields, inform the student to use it.
42+
Explain that the values cannot be null and it is less error-prone
43+
- `informative`: If the solution updates variables outside the drive function, instruct the student to move there.
44+
Explain that it is a best practice to have a single responsibility for the method. The values should be updated when the drive function is called.
45+
46+
[analyzer]: https://github.com/exercism/java-analyzer

0 commit comments

Comments
 (0)