Skip to content

Commit ff82faf

Browse files
committed
add the design.md for the calculator-conundrum
1 parent 180525c commit ff82faf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • exercises/concept/calculator-conundrum/.meta

exercises/concept/calculator-conundrum/.meta/design.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,16 @@
1818

1919
- `conditionals-if`: know how to do conditional logic.
2020
- `switch-statement`: know how to work with a `switch` statement.
21+
22+
## Analyzer
23+
24+
This exercise could benefit from the following rules in the [analyzer]:
25+
26+
- `essential`: Verify that the solution is not wrapping all the code in a try catch statement
27+
- `actionable`: If the solution uses an `if` statement, instruct the student to use the `switch case` statement instead.
28+
- `informative`: If the solution does not use `HashMap`, instruct the student to use the operator as a key and a BiFunction implementing the calculation
29+
Explain that it is more efficient for performance, and it removes the cyclomatic complexity
30+
- `informative`: If the solution does not throw the exception for `Operation cannot be null` and `Operation cannot be empty` at the beginning, instruct the student to do so
31+
Explain that it is better to fail fast, and it will make the code less error-prone and more readable
32+
33+
[analyzer]: https://github.com/exercism/java-analyzer

0 commit comments

Comments
 (0)