exercism / java

Exercism exercises in Java.
https://exercism.org/tracks/java
MIT License
686 stars 669 forks source link

Reduce the scope of the `conditionals-if` concept + exercise #2365

Closed sanderploegsma closed 11 months ago

sanderploegsma commented 11 months ago

The conditionals-if concept currently introduces too many concepts at once: if/else statements and switch statements. The latter is already covered in the switch-statement concept (which is unlocked after conditionals-if) and should probably not be introduced earlier.

The corresponding concept exercise blackjack has the same problem: it is designed to have students use a switch statement for the first task. Although it's possible for students to solve it without a switch statement it quickly becomes tedious to write 14 if statements in one method. I can imagine it would turn students off, to be honest.

We should therefore revise the concept and corresponding concept exercise to focus only on introducing the if/else statements. Especially the exercise needs a big overhaul (it did anyway, see #2311).

sanderploegsma commented 11 months ago

Also I would propose to rename the concept to if-statements or if-else-statements, since "Conditionals If" just reads awkward on the syllabus: https://exercism.org/tracks/java/concepts/conditionals-if

providentapartment commented 11 months ago

This can help make your code more readable, maintainable, and less prone to bugs.