Example code from University of Alaska Fairbanks CS 372 (Software Construction) class for Spring 2014