Repository navigation
split-second-stopwatch: compare reference with duration accumulation approach (R58-T006) - #85
Open
utkarsh21022009-boop wants to merge 1 commit into
Open
utkarsh21022009-boop wants to merge 1 commit into
utkarsh21022009-boop wants to merge 1 commit into
Conversation
…approach (R58-T006)
4 tasks
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.
Pull Request
R58-T006: split-second-stopwatch: compare reference with discrete duration accumulation approach
Description
Analyzed and compared the maintained reference implementation in
exercises/practice/split-second-stopwatch/.meta/src/reference/java/SplitSecondStopwatch.java(Continuous Wall-Clock / Epoch Offset Model) with an independently written alternative implementation (Discrete Duration Accumulation Model) for Task R58-T006. Verified both implementations against all 29 tests inSplitSecondStopwatchTest.java, including all named anchor cases, achieving 100% agreement. Documented architectural trade-offs, state handling, memory usage, and worked examples without publishing full learner solutions.Related Issue
Fixes: #6
Type of Change
Changes Made
docs/maintenance/split-second-stopwatch.md:mockTime,currentLapStart, lazy delta subtraction viaswitch (state)ingetCurrentLapTime()).advanceTime(), branch-free reads incurrentLap()andtotal()).previousLaps()on demand, inability to passively read continuous hardware clocks).exercises/practice/split-second-stopwatch/.docs/hints.md:work/R58-T006/AlternativeSplitSecondStopwatch.java:currentLapSeconds,totalLapSeconds,List<Integer> previousLapDurations).work/R58-T006/check.py:subprocessand isolatedtempfilescratch directories..meta/config.json../gradlew testruns on both reference and alternative.UnsupportedOperationException) and unmodified.tools/course_checks/r58-t006.py: Standard course runner delegating towork/R58-T006/check.py.work/R58-T006/results.json&latest-result.json: Recorded execution evidence, tool versions, and test results.work/R58-T006/README.md: Work directory documentation and execution instructions.Screenshots / Recordings
Not applicable — no UI changes.
Testing
python3 work/R58-T006/check.pypython3 tools/course_checks/r58-t006.pystartInitiatesTimeTrackingForCurrentLap()("start initiates time tracking for current lap", UUID:491487b1-593d-423e-a075-aa78d449ff1f) -> PASSEDlapAddsCurrentLapToPreviousLaps()("lap adds current lap to previous laps", UUID:091966e3-ed25-4397-908b-8bb0330118f8) -> PASSEDsupportsVeryLongLaps()("supports very long laps", UUID:0b01751a-cb57-493f-bb86-409de6e84306) -> PASSED./gradlew checkpassed cleanly.exercises/practice/split-second-stopwatch/src/main/java/SplitSecondStopwatch.javaverified unsolved and unmodified.Checklist
Additional Notes
student/e26b07f0710/R58-T006(andR58-T006).S-AI-Projects/exercism-javaonmain.Reviewer Resources:
Track Policies