Add split second stopwatch exercise - #1048
Open
resu-xuniL wants to merge 5 commits into
Open
Conversation
29 tasks
mk-mxp
self-requested a review
August 27, 2026 04:28
mk-mxp
requested changes
Aug 27, 2026
mk-mxp
left a comment
Contributor
There was a problem hiding this comment.
This looks great! If you don't want to raise the difficulty a bit as described below, we can merge it with __METHOD__ and the property comment only.
To raise the difficulty to 5 you could remove the method stubs from the student file's class body and place a comment there, that all methods need to be defined by the students. This surprises students often and we do this not very often, yet.
| { | ||
| public function __construct() | ||
| { | ||
| throw new \BadMethodCallException(sprintf('Implement the SplitSecondStopwatch %s method', __FUNCTION__)); |
Contributor
There was a problem hiding this comment.
Use __METHOD__ here:
Suggested change
| throw new \BadMethodCallException(sprintf('Implement the SplitSecondStopwatch %s method', __FUNCTION__)); | |
| throw new \BadMethodCallException(sprintf('Implement the SplitSecondStopwatch %s method', __METHOD__)); |
|
|
||
| declare(strict_types=1); | ||
|
|
||
| class SplitSecondStopwatch |
Contributor
There was a problem hiding this comment.
Please add a comment about visibility (private(set)) and that properties must be defined by the student.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
Here is another exercise for validation:
createconfig.jsonIs dificulty rank 3 OK?