-
-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reformat concept exercise Wizards and Warriors #2729
Reformat concept exercise Wizards and Warriors #2729
Conversation
Adding two new tasks so the user has to implement the classes and inheritance concept instead of being given Updating hints, instructions and introduction acordingly to the updated Adding new tests for the new tasks, and update the code given to the student
@sanderploegsma I would like your feedback here, I'm not sure why does tests are failing, locally when I run ``gradle check```all seem to be working ok |
The reason the tests are failing is because we made the decision in the past that every stub solution for every exercise should compile cleanly with the tests, so that students can use the test suite from the moment they start instead of having to diagnose compilation errors. These changes break that setup; the tests can't compile if the necessary classes are not implemented yet. If you feel strongly that this exercise should be refactored, we need to think about another way to make sure the tests can run on the starter solution. One way of doing so could be to use reflection to invoke the methods being tested, like in the |
Well I definitely think this need a reformat, what are your thoughts about the change? Maybe we could remove the first task, the one that the user creates the class, and only leave the second one that the user extends with the parent class? Or that will fail as well? |
Well you would need to change the tests a bit because statements like these still won't compile because a
Also, if you don't predefine the |
I tend to agree with your opinion on this exercise though, I think that the starter solution is too complete and would like for the student to have to do a little bit of work to get the inheritance part working. I ran into the same thing when adding the |
Great, thanks for the feedback, then I would give it a try with |
Co-authored-by: Sander Ploegsma <[email protected]>
Perhaps the exercise could benefit from a bit more restructuring: what if we reorder them so that the student first implements the
|
Also there is one problem with the current design: Because the Maybe abstract classes deserve their own concept, especially since the I have the following in mind: class Fighter {
boolean isVulnerable() {
return true;
}
int getDamagePoints(Fighter target) {
return 1;
}
} Note:
|
Updating Fighter class to not be abstract Updating instructions and hints Updating tests accordingly
I like this I added an extra task, to make the warrior invulnerable |
@sanderploegsma I will wait for your review before applying the |
I think I want to have another look at the copy in the instructions.md, but other than that it all looks pretty neat so far. I suggest finishing this PR so that all checks pass again, and then we can do some finishing touches on the copy. |
exercises/concept/wizards-and-warriors/src/test/java/FighterTest.java
Outdated
Show resolved
Hide resolved
@sanderploegsma I was thinking, should we add TODO's like the lasagna and wizard-and-warriors-2 to the given code to the student, to remain consistent with the other exercises. |
@manumafe98 I pushed some extra commits to clean up the exercise a bit more. Let me know what you think of the changes, IMO it should be good to go now. |
Yep I would say that looks great as well! Now seems more like a interactive concept exercise for a student! |
pull request
closes #2718
The goal is to update the concept exercise so the student is not directly handled the code and has to work with it a bit more.
Reviewer Resources:
Track Policies