As we saw with methods, a primary benefit of object-oriented programming is code reuse. We can create a utility and use it over and over again, in many contexts. We will do just that by designing a Stopwatch class. We will use it to time a few operations:
a words-per-minute calculator
the amount of time it takes to brute force crack a password
a competition to type in the alphabet backward
Here’s your TODO to complete before we meet again:
Two more interviews happen this week, but thankfully they are on Tuesday and Thursday. My office hours will not be disrupted. However, we will not have lab on Tuesday. I will hold a few makeup hours from 10-11:50 on Tuesday.
Please see the thread Common Homework 6 Issues on Piazza when encountering issues on the homework.
For lab 11, we will hold the 2017 SplatBot Splat-Down. You must implement a splat bot (which we will demo in class, but expect a more formal specification soon). You will have between now and the end of your lab section to beat RobotRandom for checkpoint 1 and RobotLefty for checkpoint 2. Folks who beat RobotXJ9000 best 3 out of 5 will be awarded 5 bonus Blugolds. You will also be invited to pit your robots against each other.