From 4dd7e2531718ddb4eed2462722c7769cca3a8335 Mon Sep 17 00:00:00 2001 From: Manuel Maxera <95315128+manumafe98@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:15:26 -0300 Subject: [PATCH] Creating design.md for ``football match reports`` (#2707) * Creating design.md for football match reports As it was empty it was added the learning objectives, out of scope, concepts and prerequisites Also the analyzer was created * Update exercises/concept/football-match-reports/.meta/design.md Co-authored-by: Sander Ploegsma * Indenting snippets by two spaces --------- Co-authored-by: Sander Ploegsma --- .../football-match-reports/.meta/design.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/exercises/concept/football-match-reports/.meta/design.md b/exercises/concept/football-match-reports/.meta/design.md index 3d14cb7ce..a4e3c279c 100644 --- a/exercises/concept/football-match-reports/.meta/design.md +++ b/exercises/concept/football-match-reports/.meta/design.md @@ -1 +1,50 @@ # Design + +## Learning objectives + +- Know the existence of the `Switch` statement. +- Know how to use the switch statement. +- Recognize the keywords `switch`, `case`, `break` and `default`. + +## Out of scope + +- Nested switch statements +- Advanced switch statements features like using object as case values. + +## Concepts + +- `switch`: know the existence of the `Switch` statement, how to use it and how to apply the basic keywords. + +## Prerequisites + +This exercise's prerequisites Concepts are: + +- `classes`: know how to work with classes. + +## Analyzer + +This exercise could benefit from the following rules in the [analyzer]: + +- `essential`: If the student resolved the exercise without using `switch`, instruct them to do so. +- `actionable`: If the solution returns the same value in different cases, instruct them that this could be simplified. + + ```java + switch(shirtNum) { + case 6, 7, 8: + return "midfielder"; + } + ``` + +- `actionable`: If the student does not directly return the answer from the case in the switch statement, instruct them to do so. +- `informative`: If the solution is returning the answer inside the cases, inform the student that it can be simplified by using a switch expression: + + ```java + return switch(shirtNum) { + case 6, 7, 8 -> "midfielder"; + } + ``` + +If the solution does not receive any of the above feedback, it must be exemplar. +Leave a `celebratory` comment to celebrate the success! + +[analyzer]: https://github.com/exercism/java-analyzer