all the program cpp files from chapter 2 of lecture notes