assignment3.cpp with traffic light