You may recall the implementation of SelfTest(), which created an instance of anAccumulator and tested it. This is called a test harness. You can and should create a test harness for every class you implement.
The test harness can be a program, a part of an object, or an object itself, and often it will have a user interface. Test harnesses fall into several categories:
Comprehensive—like SelfTest(), the test harness runs all the tests and checks the results against what is expected. A comprehensive test harness is especially good for quick regression tests. Some comprehensive test harnesses are driven by internal code, others by external files or databases.
Front-end—the test harness runs all the tests but leaves it to ...