NOTE: The following source code is used in the various lab exercises and is not intended to be correct code of efficient code in all cases. Some of the exercises ask the students to find out what is wrong with the code, correct it, find out how to improve its efficiency, and so on.