added lab4.cpp file.