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
Copy file name to clipboardExpand all lines: exercises/concept/calculator-conundrum/.meta/design.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,3 +18,15 @@
18
18
19
19
-`conditionals-if`: know how to do conditional logic.
20
20
-`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 using the try catch statement for the division.
27
+
-`actionable`: If the solution is wrapping all the code in a try catch statement, instruct the student to only use the `try catch` for the division statement
28
+
-`actionable`: If the solution uses only `if` statement, instruct the student that he/she can use the `switch case` statement to perform the operation.
29
+
-`informative`: If the solution does not throw the exception for `Operation cannot be null` and `Operation cannot be empty` at the beginning, suggest the fail-fast approach to the student.
30
+
Inform this way of implementation can be less error-prone and more readable as suggested by Martin Fowler: https://martinfowler.com/ieeeSoftware/failFast.pdf
0 commit comments