Our mini-project for this week will focus on combining text drawing in the canvas with timers to build a simple digital stopwatch that keeps track of the time in tenths of a second. The stopwatch should contain “Start”, “Stop” and “Reset” buttons. To help guide you through this project, we suggest that you download the provided program template for this mini-project and build your stopwatch program as follows:
Mini-project development process
Hint: Use integer division and remainder (modular arithmetic) to extract various digits for the formatted time from the global integer timer.
Steps 1-3 and 5-7 above are relatively straightforward. However, step 4 requires some adept use of integer division and modular arithmetic. So, we again emphasize that you build and debug the helper function format(t) separately following the tips in the Code Clinic page linked below. Following this process will save you time. For an example of a full implementation, we suggest that you watch the video lecture on this mini-project.
For more helpful tips on implementing this mini-project, please visit the Code Clinic tips page for this mini-project.
Grading Rubric – 13 pts total (scaled to 100 pts)
In the submission phase, cut and paste the URL for your cloud-saved mini-project into the box below. Click the Honor Code box and hit the “Submit for grading” button when you are ready to submit your mini-project. (You may submit as many times as you like before the deadline so we suggest that you use “Submit” instead of “Save”.) IMPORTANT: Please use the “Review your work” link that appears at the top of the subsequent submission page to verify that you submitted a working link for the final version of your mini-project.