Skip to content

Commit 2a80bc9

Browse files
committed
done?
1 parent f7f6ba2 commit 2a80bc9

File tree

1 file changed

+15
-2
lines changed
  • exercises/concept/logs-logs-logs/.meta

1 file changed

+15
-2
lines changed

exercises/concept/logs-logs-logs/.meta/design.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,22 @@ This exercise's prerequisites Concepts are:
2626
This exercise could benefit from the following rules in the [analyzer][analyzer]:
2727

2828
1. Parse log level
29-
- `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to their being many cases.
29+
- `LogLevel`
30+
- `essential`: Verify that necessary and sufficient constants are present in enum declaration (minus unknown, for now) and that the constructor is present.
31+
- `actionable`: The enum should be public; prompt the student to think of encapsulation.
32+
- `LogLine.getLogLevel()`
33+
- `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to there being many cases.
34+
- `actionable`: The function should be public.
3035
2. Support unknown log level
31-
- `essential`: Again, verify that a default was used in a switch statement. Comment as above in the case of an if-else.
36+
- `essential`: Verify that an unknown constant is present in the enum declaration.
37+
- `essential`: Verify that a default was used in a switch statement. Comment as previously stated in the case of an if-else.
3238
3. Convert log line to short format
39+
- `essential`: Verify that the constructor is appropriately updated.
40+
- `essential`: Verify that there exists a field dedicated to the encoded log level.
41+
- `actionable`: Said field should be private and final.
42+
- `LogLine.getOutputForShortLog()`
43+
- `celebratory`: Congratulate the student if they used a getter for the encoded log level.
44+
- `celebratory`: Celebrate if this was written in one line.
45+
- `informative`: Let them know they can write it in one line.
3346

3447
[analyzer]: https://github.com/exercism/java-analyzer

0 commit comments

Comments
 (0)