Added source to lab4.tex and comments in lab4.cc