Skip to content

Add split second stopwatch exercise - #1048

Open
resu-xuniL wants to merge 5 commits into
exercism:mainfrom
resu-xuniL:add-split-second-stopwatch
Open

Add split second stopwatch exercise#1048
resu-xuniL wants to merge 5 commits into
exercism:mainfrom
resu-xuniL:add-split-second-stopwatch

Conversation

@resu-xuniL

Copy link
Copy Markdown
Contributor

Hello!
Here is another exercise for validation:

  • Generated exercice with configlet create
  • Coded test and example
  • Set the difficulty rank to 3
  • Added GitHub handle to config.json

Is dificulty rank 3 OK?

@mk-mxp
mk-mxp self-requested a review August 27, 2026 04:28
@mk-mxp mk-mxp added x:action/create Work on something from scratch x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) x:size/medium Medium amount of work x:rep/medium Medium amount of reputation labels Aug 27, 2026

@mk-mxp mk-mxp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment about visibility (private(set)) and that properties must be defined by the student.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:action/create Work on something from scratch x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation x:size/medium Medium amount of work x:type/content Work on content (e.g. exercises, concepts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants